<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span id="local-6989586621679711783"><span id="local-6989586621679711784"><span id="local-6989586621679711785"><span id="local-6989586621679711786"><span id="local-6989586621679711787"><span id="local-6989586621679711788"><span id="local-6989586621679711789"><span id="local-6989586621679711790"></span></span></span></span></span></span></span></span><span class="hs-pragma">{-# LANGUAGE DeriveGeneric #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE FlexibleContexts #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE RankNTypes #-}</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Module      :  Distribution.Client.BuildTargets</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Copyright   :  (c) Duncan Coutts 2012</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- License     :  BSD-like</span><span>
</span><span id="line-10"></span><span class="hs-comment">--</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Maintainer  :  duncan@community.haskell.org</span><span>
</span><span id="line-12"></span><span class="hs-comment">--</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- Handling for user-specified build targets</span><span>
</span><span id="line-14"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-15"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Simple.BuildTarget</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-16"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Main interface</span></span><span>
</span><span id="line-17"></span><span>    </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#readTargetInfos"><span class="hs-identifier">readTargetInfos</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>    </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#readBuildTargets"><span class="hs-identifier">readBuildTargets</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-comment">-- in case you don't have LocalBuildInfo</span><span>
</span><span id="line-19"></span><span>
</span><span id="line-20"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Build targets</span></span><span>
</span><span id="line-21"></span><span>    </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier">BuildTarget</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>    </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#showBuildTarget"><span class="hs-identifier">showBuildTarget</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>    </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#QualLevel"><span class="hs-identifier">QualLevel</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>    </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#buildTargetComponentName"><span class="hs-identifier">buildTargetComponentName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Parsing user build targets</span></span><span>
</span><span id="line-27"></span><span>    </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier">UserBuildTarget</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>    </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#readUserBuildTargets"><span class="hs-identifier">readUserBuildTargets</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>    </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#showUserBuildTarget"><span class="hs-identifier">showUserBuildTarget</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>    </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetProblem"><span class="hs-identifier">UserBuildTargetProblem</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>    </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#reportUserBuildTargetProblems"><span class="hs-identifier">reportUserBuildTargetProblems</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Resolving build targets</span></span><span>
</span><span id="line-34"></span><span>    </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#resolveBuildTargets"><span class="hs-identifier">resolveBuildTargets</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>    </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetProblem"><span class="hs-identifier">BuildTargetProblem</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>    </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#reportBuildTargetProblems"><span class="hs-identifier">reportBuildTargetProblems</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-38"></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.TargetInfo.html"><span class="hs-identifier">Distribution.Types.TargetInfo</span></a></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html"><span class="hs-identifier">Distribution.Types.LocalBuildInfo</span></a></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentRequestedSpec.html"><span class="hs-identifier">Distribution.Types.ComponentRequestedSpec</span></a></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.ForeignLib.html"><span class="hs-identifier">Distribution.Types.ForeignLib</span></a></span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.UnqualComponentName.html"><span class="hs-identifier">Distribution.Types.UnqualComponentName</span></a></span><span>
</span><span id="line-47"></span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Package.html"><span class="hs-identifier">Distribution.Package</span></a></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.PackageDescription.html"><span class="hs-identifier">Distribution.PackageDescription</span></a></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.ModuleName.html"><span class="hs-identifier">Distribution.ModuleName</span></a></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.LocalBuildInfo.html"><span class="hs-identifier">Distribution.Simple.LocalBuildInfo</span></a></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Pretty.html"><span class="hs-identifier">Distribution.Pretty</span></a></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Parsec.html"><span class="hs-identifier">Distribution.Parsec</span></a></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Utils.html"><span class="hs-identifier">Distribution.Simple.Utils</span></a></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html"><span class="hs-identifier">Distribution.Verbosity</span></a></span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Compat.CharParsing.html"><span class="hs-identifier">Distribution.Compat.CharParsing</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">P</span></span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.Foldable.html#msum"><span class="hs-identifier">msum</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.OldList.html#stripPrefix"><span class="hs-identifier">stripPrefix</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.OldList.html#groupBy"><span class="hs-identifier">groupBy</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Data.List.NonEmpty.html#"><span class="hs-identifier">Data.List.NonEmpty</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">NE</span></span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.html#"><span class="hs-identifier">System.FilePath</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">FilePath</span></span><span>
</span><span id="line-63"></span><span>         </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#dropExtension"><span class="hs-identifier">dropExtension</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#normalise"><span class="hs-identifier">normalise</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#splitDirectories"><span class="hs-identifier">splitDirectories</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#joinPath"><span class="hs-identifier">joinPath</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#splitPath"><span class="hs-identifier">splitPath</span></a></span><span>
</span><span id="line-64"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#hasTrailingPathSeparator"><span class="hs-identifier">hasTrailingPathSeparator</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-65"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#"><span class="hs-identifier">System.Directory</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#doesFileExist"><span class="hs-identifier">doesFileExist</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#doesDirectoryExist"><span class="hs-identifier">doesDirectoryExist</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-66"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.html#"><span class="hs-identifier">Data.Map</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Map</span></span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span class="hs-comment">-- | Take a list of 'String' build targets, and parse and validate them</span><span>
</span><span id="line-69"></span><span class="hs-comment">-- into actual 'TargetInfo's to be built/registered/whatever.</span><span>
</span><span id="line-70"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#readTargetInfos"><span class="hs-identifier hs-type">readTargetInfos</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.TargetInfo.html#TargetInfo"><span class="hs-identifier hs-type">TargetInfo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-71"></span><span id="readTargetInfos"><span class="annot"><span class="annottext">readTargetInfos :: Verbosity
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; [FilePath]
-&gt; IO [TargetInfo]
</span><a href="Distribution.Simple.BuildTarget.html#readTargetInfos"><span class="hs-identifier hs-var hs-var">readTargetInfos</span></a></span></span><span> </span><span id="local-6989586621679711626"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679711626"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679711625"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679711625"><span class="hs-identifier hs-var">pkg_descr</span></a></span></span><span> </span><span id="local-6989586621679711624"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679711624"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679711623"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679711623"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-72"></span><span>    </span><span id="local-6989586621679711622"><span class="annot"><span class="annottext">[BuildTarget]
</span><a href="#local-6989586621679711622"><span class="hs-identifier hs-var">build_targets</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; PackageDescription -&gt; [FilePath] -&gt; IO [BuildTarget]
</span><a href="Distribution.Simple.BuildTarget.html#readBuildTargets"><span class="hs-identifier hs-var">readBuildTargets</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679711626"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679711625"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679711623"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-73"></span><span>    </span><span class="annot"><span class="annottext">Verbosity
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; [BuildTarget]
-&gt; IO [TargetInfo]
</span><a href="Distribution.Simple.BuildTarget.html#checkBuildTargets"><span class="hs-identifier hs-var">checkBuildTargets</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679711626"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679711625"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679711624"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">[BuildTarget]
</span><a href="#local-6989586621679711622"><span class="hs-identifier hs-var">build_targets</span></a></span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-76"></span><span class="hs-comment">-- * User build targets</span><span>
</span><span id="line-77"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-78"></span><span>
</span><span id="line-79"></span><span class="hs-comment">-- | Various ways that a user may specify a build target.</span><span>
</span><span id="line-80"></span><span class="hs-comment">--</span><span>
</span><span id="line-81"></span><span class="hs-keyword">data</span><span> </span><span id="UserBuildTarget"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier hs-var">UserBuildTarget</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span>     </span><span class="hs-comment">-- | A target specified by a single name. This could be a component</span><span>
</span><span id="line-84"></span><span>     </span><span class="hs-comment">-- module or file.</span><span>
</span><span id="line-85"></span><span>     </span><span class="hs-comment">--</span><span>
</span><span id="line-86"></span><span>     </span><span class="hs-comment">-- &gt; cabal build foo</span><span>
</span><span id="line-87"></span><span>     </span><span class="hs-comment">-- &gt; cabal build Data.Foo</span><span>
</span><span id="line-88"></span><span>     </span><span class="hs-comment">-- &gt; cabal build Data/Foo.hs  Data/Foo.hsc</span><span>
</span><span id="line-89"></span><span>     </span><span class="hs-comment">--</span><span>
</span><span id="line-90"></span><span>     </span><span id="UserBuildTargetSingle"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetSingle"><span class="hs-identifier hs-var">UserBuildTargetSingle</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span>     </span><span class="hs-comment">-- | A target specified by a qualifier and name. This could be a component</span><span>
</span><span id="line-93"></span><span>     </span><span class="hs-comment">-- name qualified by the component namespace kind, or a module or file</span><span>
</span><span id="line-94"></span><span>     </span><span class="hs-comment">-- qualified by the component name.</span><span>
</span><span id="line-95"></span><span>     </span><span class="hs-comment">--</span><span>
</span><span id="line-96"></span><span>     </span><span class="hs-comment">-- &gt; cabal build lib:foo exe:foo</span><span>
</span><span id="line-97"></span><span>     </span><span class="hs-comment">-- &gt; cabal build foo:Data.Foo</span><span>
</span><span id="line-98"></span><span>     </span><span class="hs-comment">-- &gt; cabal build foo:Data/Foo.hs</span><span>
</span><span id="line-99"></span><span>     </span><span class="hs-comment">--</span><span>
</span><span id="line-100"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="UserBuildTargetDouble"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetDouble"><span class="hs-identifier hs-var">UserBuildTargetDouble</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-101"></span><span>
</span><span id="line-102"></span><span>     </span><span class="hs-comment">-- | A fully qualified target, either a module or file qualified by a</span><span>
</span><span id="line-103"></span><span>     </span><span class="hs-comment">-- component name with the component namespace kind.</span><span>
</span><span id="line-104"></span><span>     </span><span class="hs-comment">--</span><span>
</span><span id="line-105"></span><span>     </span><span class="hs-comment">-- &gt; cabal build lib:foo:Data/Foo.hs exe:foo:Data/Foo.hs</span><span>
</span><span id="line-106"></span><span>     </span><span class="hs-comment">-- &gt; cabal build lib:foo:Data.Foo exe:foo:Data.Foo</span><span>
</span><span id="line-107"></span><span>     </span><span class="hs-comment">--</span><span>
</span><span id="line-108"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="UserBuildTargetTriple"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetTriple"><span class="hs-identifier hs-var">UserBuildTargetTriple</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-109"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679711601"><span id="local-6989586621679711603"><span id="local-6989586621679711616"><span class="annot"><span class="annottext">Int -&gt; UserBuildTarget -&gt; ShowS
[UserBuildTarget] -&gt; ShowS
UserBuildTarget -&gt; FilePath
(Int -&gt; UserBuildTarget -&gt; ShowS)
-&gt; (UserBuildTarget -&gt; FilePath)
-&gt; ([UserBuildTarget] -&gt; ShowS)
-&gt; Show UserBuildTarget
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; FilePath) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [UserBuildTarget] -&gt; ShowS
$cshowList :: [UserBuildTarget] -&gt; ShowS
show :: UserBuildTarget -&gt; FilePath
$cshow :: UserBuildTarget -&gt; FilePath
showsPrec :: Int -&gt; UserBuildTarget -&gt; ShowS
$cshowsPrec :: Int -&gt; UserBuildTarget -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711589"><span id="local-6989586621679711597"><span class="annot"><span class="annottext">UserBuildTarget -&gt; UserBuildTarget -&gt; Bool
(UserBuildTarget -&gt; UserBuildTarget -&gt; Bool)
-&gt; (UserBuildTarget -&gt; UserBuildTarget -&gt; Bool)
-&gt; Eq UserBuildTarget
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: UserBuildTarget -&gt; UserBuildTarget -&gt; Bool
$c/= :: UserBuildTarget -&gt; UserBuildTarget -&gt; Bool
== :: UserBuildTarget -&gt; UserBuildTarget -&gt; Bool
$c== :: UserBuildTarget -&gt; UserBuildTarget -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711557"><span id="local-6989586621679711559"><span id="local-6989586621679711562"><span id="local-6989586621679711565"><span id="local-6989586621679711568"><span id="local-6989586621679711576"><span id="local-6989586621679711584"><span class="annot"><span class="annottext">Eq UserBuildTarget
Eq UserBuildTarget
-&gt; (UserBuildTarget -&gt; UserBuildTarget -&gt; Ordering)
-&gt; (UserBuildTarget -&gt; UserBuildTarget -&gt; Bool)
-&gt; (UserBuildTarget -&gt; UserBuildTarget -&gt; Bool)
-&gt; (UserBuildTarget -&gt; UserBuildTarget -&gt; Bool)
-&gt; (UserBuildTarget -&gt; UserBuildTarget -&gt; Bool)
-&gt; (UserBuildTarget -&gt; UserBuildTarget -&gt; UserBuildTarget)
-&gt; (UserBuildTarget -&gt; UserBuildTarget -&gt; UserBuildTarget)
-&gt; Ord UserBuildTarget
UserBuildTarget -&gt; UserBuildTarget -&gt; Bool
UserBuildTarget -&gt; UserBuildTarget -&gt; Ordering
UserBuildTarget -&gt; UserBuildTarget -&gt; UserBuildTarget
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
min :: UserBuildTarget -&gt; UserBuildTarget -&gt; UserBuildTarget
$cmin :: UserBuildTarget -&gt; UserBuildTarget -&gt; UserBuildTarget
max :: UserBuildTarget -&gt; UserBuildTarget -&gt; UserBuildTarget
$cmax :: UserBuildTarget -&gt; UserBuildTarget -&gt; UserBuildTarget
&gt;= :: UserBuildTarget -&gt; UserBuildTarget -&gt; Bool
$c&gt;= :: UserBuildTarget -&gt; UserBuildTarget -&gt; Bool
&gt; :: UserBuildTarget -&gt; UserBuildTarget -&gt; Bool
$c&gt; :: UserBuildTarget -&gt; UserBuildTarget -&gt; Bool
&lt;= :: UserBuildTarget -&gt; UserBuildTarget -&gt; Bool
$c&lt;= :: UserBuildTarget -&gt; UserBuildTarget -&gt; Bool
&lt; :: UserBuildTarget -&gt; UserBuildTarget -&gt; Bool
$c&lt; :: UserBuildTarget -&gt; UserBuildTarget -&gt; Bool
compare :: UserBuildTarget -&gt; UserBuildTarget -&gt; Ordering
$ccompare :: UserBuildTarget -&gt; UserBuildTarget -&gt; Ordering
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></span></span></span></span></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-110"></span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-113"></span><span class="hs-comment">-- * Resolved build targets</span><span>
</span><span id="line-114"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span class="hs-comment">-- | A fully resolved build target.</span><span>
</span><span id="line-117"></span><span class="hs-comment">--</span><span>
</span><span id="line-118"></span><span id="local-6989586621679711554"><span id="local-6989586621679711555"></span></span><span class="hs-keyword">data</span><span> </span><span id="BuildTarget"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-var">BuildTarget</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span>     </span><span class="hs-comment">-- | A specific component</span><span>
</span><span id="line-121"></span><span>     </span><span class="hs-comment">--</span><span>
</span><span id="line-122"></span><span>     </span><span id="BuildTargetComponent"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetComponent"><span class="hs-identifier hs-var">BuildTargetComponent</span></a></span></span><span> </span><span class="annot"><a href="Distribution.Types.ComponentName.html#ComponentName"><span class="hs-identifier hs-type">ComponentName</span></a></span><span>
</span><span id="line-123"></span><span>
</span><span id="line-124"></span><span>     </span><span class="hs-comment">-- | A specific module within a specific component.</span><span>
</span><span id="line-125"></span><span>     </span><span class="hs-comment">--</span><span>
</span><span id="line-126"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="BuildTargetModule"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetModule"><span class="hs-identifier hs-var">BuildTargetModule</span></a></span></span><span> </span><span class="annot"><a href="Distribution.Types.ComponentName.html#ComponentName"><span class="hs-identifier hs-type">ComponentName</span></a></span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span>
</span><span id="line-127"></span><span>
</span><span id="line-128"></span><span>     </span><span class="hs-comment">-- | A specific file within a specific component.</span><span>
</span><span id="line-129"></span><span>     </span><span class="hs-comment">--</span><span>
</span><span id="line-130"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="BuildTargetFile"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetFile"><span class="hs-identifier hs-var">BuildTargetFile</span></a></span></span><span> </span><span class="annot"><a href="Distribution.Types.ComponentName.html#ComponentName"><span class="hs-identifier hs-type">ComponentName</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-131"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679711540"><span id="local-6989586621679711549"><span class="annot"><span class="annottext">BuildTarget -&gt; BuildTarget -&gt; Bool
(BuildTarget -&gt; BuildTarget -&gt; Bool)
-&gt; (BuildTarget -&gt; BuildTarget -&gt; Bool) -&gt; Eq BuildTarget
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: BuildTarget -&gt; BuildTarget -&gt; Bool
$c/= :: BuildTarget -&gt; BuildTarget -&gt; Bool
== :: BuildTarget -&gt; BuildTarget -&gt; Bool
$c== :: BuildTarget -&gt; BuildTarget -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711523"><span id="local-6989586621679711525"><span id="local-6989586621679711538"><span class="annot"><span class="annottext">Int -&gt; BuildTarget -&gt; ShowS
[BuildTarget] -&gt; ShowS
BuildTarget -&gt; FilePath
(Int -&gt; BuildTarget -&gt; ShowS)
-&gt; (BuildTarget -&gt; FilePath)
-&gt; ([BuildTarget] -&gt; ShowS)
-&gt; Show BuildTarget
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; FilePath) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [BuildTarget] -&gt; ShowS
$cshowList :: [BuildTarget] -&gt; ShowS
show :: BuildTarget -&gt; FilePath
$cshow :: BuildTarget -&gt; FilePath
showsPrec :: Int -&gt; BuildTarget -&gt; ShowS
$cshowsPrec :: Int -&gt; BuildTarget -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall x. BuildTarget -&gt; Rep BuildTarget x)
-&gt; (forall x. Rep BuildTarget x -&gt; BuildTarget)
-&gt; Generic BuildTarget
forall x. Rep BuildTarget x -&gt; BuildTarget
forall x. BuildTarget -&gt; Rep BuildTarget x
forall a.
(forall x. a -&gt; Rep a x) -&gt; (forall x. Rep a x -&gt; a) -&gt; Generic a
$cto :: forall x. Rep BuildTarget x -&gt; BuildTarget
$cfrom :: forall x. BuildTarget -&gt; Rep BuildTarget x
</span><a href="../../base/src/GHC.Generics.html#Generic"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679711514"><span id="local-6989586621679711516"><span id="local-6989586621679711518"><span class="annot"><a href="../../binary/src/Data.Binary.Class.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span></span></span></span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#buildTargetComponentName"><span class="hs-identifier hs-type">buildTargetComponentName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentName.html#ComponentName"><span class="hs-identifier hs-type">ComponentName</span></a></span><span>
</span><span id="line-136"></span><span id="buildTargetComponentName"><span class="annot"><span class="annottext">buildTargetComponentName :: BuildTarget -&gt; ComponentName
</span><a href="Distribution.Simple.BuildTarget.html#buildTargetComponentName"><span class="hs-identifier hs-var hs-var">buildTargetComponentName</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetComponent"><span class="hs-identifier hs-type">BuildTargetComponent</span></a></span><span> </span><span id="local-6989586621679711512"><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711512"><span class="hs-identifier hs-var">cn</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711512"><span class="hs-identifier hs-var">cn</span></a></span><span>
</span><span id="line-137"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#buildTargetComponentName"><span class="hs-identifier hs-var">buildTargetComponentName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetModule"><span class="hs-identifier hs-type">BuildTargetModule</span></a></span><span>    </span><span id="local-6989586621679711511"><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711511"><span class="hs-identifier hs-var">cn</span></a></span></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711511"><span class="hs-identifier hs-var">cn</span></a></span><span>
</span><span id="line-138"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#buildTargetComponentName"><span class="hs-identifier hs-var">buildTargetComponentName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetFile"><span class="hs-identifier hs-type">BuildTargetFile</span></a></span><span>      </span><span id="local-6989586621679711510"><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711510"><span class="hs-identifier hs-var">cn</span></a></span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711510"><span class="hs-identifier hs-var">cn</span></a></span><span>
</span><span id="line-139"></span><span>
</span><span id="line-140"></span><span class="hs-comment">-- | Read a list of user-supplied build target strings and resolve them to</span><span>
</span><span id="line-141"></span><span class="hs-comment">-- 'BuildTarget's according to a 'PackageDescription'. If there are problems</span><span>
</span><span id="line-142"></span><span class="hs-comment">-- with any of the targets e.g. they don't exist or are misformatted, throw an</span><span>
</span><span id="line-143"></span><span class="hs-comment">-- 'IOException'.</span><span>
</span><span id="line-144"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#readBuildTargets"><span class="hs-identifier hs-type">readBuildTargets</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-145"></span><span id="readBuildTargets"><span class="annot"><span class="annottext">readBuildTargets :: Verbosity -&gt; PackageDescription -&gt; [FilePath] -&gt; IO [BuildTarget]
</span><a href="Distribution.Simple.BuildTarget.html#readBuildTargets"><span class="hs-identifier hs-var hs-var">readBuildTargets</span></a></span></span><span> </span><span id="local-6989586621679711509"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679711509"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679711508"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679711508"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span id="local-6989586621679711507"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679711507"><span class="hs-identifier hs-var">targetStrs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-146"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679711506"><span class="annot"><span class="annottext">[UserBuildTargetProblem]
</span><a href="#local-6989586621679711506"><span class="hs-identifier hs-var">uproblems</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711505"><span class="annot"><span class="annottext">[UserBuildTarget]
</span><a href="#local-6989586621679711505"><span class="hs-identifier hs-var">utargets</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; ([UserBuildTargetProblem], [UserBuildTarget])
</span><a href="Distribution.Simple.BuildTarget.html#readUserBuildTargets"><span class="hs-identifier hs-var">readUserBuildTargets</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679711507"><span class="hs-identifier hs-var">targetStrs</span></a></span><span>
</span><span id="line-147"></span><span>    </span><span class="annot"><span class="annottext">Verbosity -&gt; [UserBuildTargetProblem] -&gt; IO ()
</span><a href="Distribution.Simple.BuildTarget.html#reportUserBuildTargetProblems"><span class="hs-identifier hs-var">reportUserBuildTargetProblems</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679711509"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">[UserBuildTargetProblem]
</span><a href="#local-6989586621679711506"><span class="hs-identifier hs-var">uproblems</span></a></span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span>    </span><span id="local-6989586621679711504"><span class="annot"><span class="annottext">[(UserBuildTarget, Bool)]
</span><a href="#local-6989586621679711504"><span class="hs-identifier hs-var">utargets'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(UserBuildTarget -&gt; IO (UserBuildTarget, Bool))
-&gt; [UserBuildTarget] -&gt; IO [(UserBuildTarget, Bool)]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="annot"><span class="annottext">UserBuildTarget -&gt; IO (UserBuildTarget, Bool)
</span><a href="Distribution.Simple.BuildTarget.html#checkTargetExistsAsFile"><span class="hs-identifier hs-var">checkTargetExistsAsFile</span></a></span><span> </span><span class="annot"><span class="annottext">[UserBuildTarget]
</span><a href="#local-6989586621679711505"><span class="hs-identifier hs-var">utargets</span></a></span><span>
</span><span id="line-150"></span><span>
</span><span id="line-151"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679711501"><span class="annot"><span class="annottext">[BuildTargetProblem]
</span><a href="#local-6989586621679711501"><span class="hs-identifier hs-var">bproblems</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711500"><span class="annot"><span class="annottext">[BuildTarget]
</span><a href="#local-6989586621679711500"><span class="hs-identifier hs-var">btargets</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription
-&gt; [(UserBuildTarget, Bool)]
-&gt; ([BuildTargetProblem], [BuildTarget])
</span><a href="Distribution.Simple.BuildTarget.html#resolveBuildTargets"><span class="hs-identifier hs-var">resolveBuildTargets</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679711508"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">[(UserBuildTarget, Bool)]
</span><a href="#local-6989586621679711504"><span class="hs-identifier hs-var">utargets'</span></a></span><span>
</span><span id="line-152"></span><span>    </span><span class="annot"><span class="annottext">Verbosity -&gt; [BuildTargetProblem] -&gt; IO ()
</span><a href="Distribution.Simple.BuildTarget.html#reportBuildTargetProblems"><span class="hs-identifier hs-var">reportBuildTargetProblems</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679711509"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">[BuildTargetProblem]
</span><a href="#local-6989586621679711501"><span class="hs-identifier hs-var">bproblems</span></a></span><span>
</span><span id="line-153"></span><span>
</span><span id="line-154"></span><span>    </span><span class="annot"><span class="annottext">[BuildTarget] -&gt; IO [BuildTarget]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">[BuildTarget]
</span><a href="#local-6989586621679711500"><span class="hs-identifier hs-var">btargets</span></a></span><span>
</span><span id="line-155"></span><span>
</span><span id="line-156"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#checkTargetExistsAsFile"><span class="hs-identifier hs-type">checkTargetExistsAsFile</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier hs-type">UserBuildTarget</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier hs-type">UserBuildTarget</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span>
</span><span id="line-157"></span><span id="checkTargetExistsAsFile"><span class="annot"><span class="annottext">checkTargetExistsAsFile :: UserBuildTarget -&gt; IO (UserBuildTarget, Bool)
</span><a href="Distribution.Simple.BuildTarget.html#checkTargetExistsAsFile"><span class="hs-identifier hs-var hs-var">checkTargetExistsAsFile</span></a></span></span><span> </span><span id="local-6989586621679711499"><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711499"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-158"></span><span>    </span><span id="local-6989586621679711498"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679711498"><span class="hs-identifier hs-var">fexists</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; IO Bool
</span><a href="#local-6989586621679711497"><span class="hs-identifier hs-var">existsAsFile</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UserBuildTarget -&gt; FilePath
</span><a href="#local-6989586621679711496"><span class="hs-identifier hs-var">fileComponentOfTarget</span></a></span><span> </span><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711499"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-159"></span><span>    </span><span class="annot"><span class="annottext">(UserBuildTarget, Bool) -&gt; IO (UserBuildTarget, Bool)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711499"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679711498"><span class="hs-identifier hs-var">fexists</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-160"></span><span>
</span><span id="line-161"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-162"></span><span>    </span><span id="local-6989586621679711497"><span class="annot"><span class="annottext">existsAsFile :: FilePath -&gt; IO Bool
</span><a href="#local-6989586621679711497"><span class="hs-identifier hs-var hs-var">existsAsFile</span></a></span></span><span> </span><span id="local-6989586621679711493"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711493"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-163"></span><span>      </span><span id="local-6989586621679711492"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679711492"><span class="hs-identifier hs-var">exists</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; IO Bool
</span><a href="../../directory/src/System.Directory.html#doesFileExist"><span class="hs-identifier hs-var">doesFileExist</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711493"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-164"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath]
</span><a href="../../filepath/src/System.FilePath.Windows.html#splitPath"><span class="hs-identifier hs-var">splitPath</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711493"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-165"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621679711491"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711491"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[FilePath]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Bool
</span><a href="../../filepath/src/System.FilePath.Windows.html#hasTrailingPathSeparator"><span class="hs-identifier hs-var">hasTrailingPathSeparator</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711491"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; IO Bool
</span><a href="../../directory/src/System.Directory.html#doesDirectoryExist"><span class="hs-identifier hs-var">doesDirectoryExist</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711491"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-166"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621679711490"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711490"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[FilePath]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679711492"><span class="hs-identifier hs-var">exists</span></a></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; IO Bool
</span><a href="../../directory/src/System.Directory.html#doesDirectoryExist"><span class="hs-identifier hs-var">doesDirectoryExist</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711490"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-167"></span><span>        </span><span class="annot"><span class="annottext">[FilePath]
</span><span class="hs-identifier">_</span></span><span>                                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; IO Bool
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679711492"><span class="hs-identifier hs-var">exists</span></a></span><span>
</span><span id="line-168"></span><span>
</span><span id="line-169"></span><span>    </span><span id="local-6989586621679711496"><span class="annot"><span class="annottext">fileComponentOfTarget :: UserBuildTarget -&gt; FilePath
</span><a href="#local-6989586621679711496"><span class="hs-identifier hs-var hs-var">fileComponentOfTarget</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetSingle"><span class="hs-identifier hs-type">UserBuildTargetSingle</span></a></span><span>     </span><span id="local-6989586621679711488"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711488"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711488"><span class="hs-identifier hs-var">s1</span></a></span><span>
</span><span id="line-170"></span><span>    </span><span class="annot"><a href="#local-6989586621679711496"><span class="hs-identifier hs-var">fileComponentOfTarget</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetDouble"><span class="hs-identifier hs-type">UserBuildTargetDouble</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span>   </span><span id="local-6989586621679711487"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711487"><span class="hs-identifier hs-var">s2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711487"><span class="hs-identifier hs-var">s2</span></a></span><span>
</span><span id="line-171"></span><span>    </span><span class="annot"><a href="#local-6989586621679711496"><span class="hs-identifier hs-var">fileComponentOfTarget</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetTriple"><span class="hs-identifier hs-type">UserBuildTargetTriple</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679711486"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711486"><span class="hs-identifier hs-var">s3</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711486"><span class="hs-identifier hs-var">s3</span></a></span><span>
</span><span id="line-172"></span><span>
</span><span id="line-173"></span><span>
</span><span id="line-174"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-175"></span><span class="hs-comment">-- * Parsing user targets</span><span>
</span><span id="line-176"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-177"></span><span>
</span><span id="line-178"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#readUserBuildTargets"><span class="hs-identifier hs-type">readUserBuildTargets</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetProblem"><span class="hs-identifier hs-type">UserBuildTargetProblem</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-179"></span><span>                                    </span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier hs-type">UserBuildTarget</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-180"></span><span id="readUserBuildTargets"><span class="annot"><span class="annottext">readUserBuildTargets :: [FilePath] -&gt; ([UserBuildTargetProblem], [UserBuildTarget])
</span><a href="Distribution.Simple.BuildTarget.html#readUserBuildTargets"><span class="hs-identifier hs-var hs-var">readUserBuildTargets</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Either UserBuildTargetProblem UserBuildTarget]
-&gt; ([UserBuildTargetProblem], [UserBuildTarget])
forall a b. [Either a b] -&gt; ([a], [b])
</span><a href="../../base/src/Data.Either.html#partitionEithers"><span class="hs-identifier hs-var">partitionEithers</span></a></span><span> </span><span class="annot"><span class="annottext">([Either UserBuildTargetProblem UserBuildTarget]
 -&gt; ([UserBuildTargetProblem], [UserBuildTarget]))
-&gt; ([FilePath] -&gt; [Either UserBuildTargetProblem UserBuildTarget])
-&gt; [FilePath]
-&gt; ([UserBuildTargetProblem], [UserBuildTarget])
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Either UserBuildTargetProblem UserBuildTarget)
-&gt; [FilePath] -&gt; [Either UserBuildTargetProblem UserBuildTarget]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Either UserBuildTargetProblem UserBuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#readUserBuildTarget"><span class="hs-identifier hs-var">readUserBuildTarget</span></a></span><span>
</span><span id="line-181"></span><span>
</span><span id="line-182"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-183"></span><span class="hs-comment">--</span><span>
</span><span id="line-184"></span><span class="hs-comment">-- &gt;&gt;&gt; readUserBuildTarget &quot;comp&quot;</span><span>
</span><span id="line-185"></span><span class="hs-comment">-- Right (UserBuildTargetSingle &quot;comp&quot;)</span><span>
</span><span id="line-186"></span><span class="hs-comment">--</span><span>
</span><span id="line-187"></span><span class="hs-comment">-- &gt;&gt;&gt; readUserBuildTarget &quot;lib:comp&quot;</span><span>
</span><span id="line-188"></span><span class="hs-comment">-- Right (UserBuildTargetDouble &quot;lib&quot; &quot;comp&quot;)</span><span>
</span><span id="line-189"></span><span class="hs-comment">--</span><span>
</span><span id="line-190"></span><span class="hs-comment">-- &gt;&gt;&gt; readUserBuildTarget &quot;pkg:lib:comp&quot;</span><span>
</span><span id="line-191"></span><span class="hs-comment">-- Right (UserBuildTargetTriple &quot;pkg&quot; &quot;lib&quot; &quot;comp&quot;)</span><span>
</span><span id="line-192"></span><span class="hs-comment">--</span><span>
</span><span id="line-193"></span><span class="hs-comment">-- &gt;&gt;&gt; readUserBuildTarget &quot;\&quot;comp\&quot;&quot;</span><span>
</span><span id="line-194"></span><span class="hs-comment">-- Right (UserBuildTargetSingle &quot;comp&quot;)</span><span>
</span><span id="line-195"></span><span class="hs-comment">--</span><span>
</span><span id="line-196"></span><span class="hs-comment">-- &gt;&gt;&gt; readUserBuildTarget &quot;lib:\&quot;comp\&quot;&quot;</span><span>
</span><span id="line-197"></span><span class="hs-comment">-- Right (UserBuildTargetDouble &quot;lib&quot; &quot;comp&quot;)</span><span>
</span><span id="line-198"></span><span class="hs-comment">--</span><span>
</span><span id="line-199"></span><span class="hs-comment">-- &gt;&gt;&gt; readUserBuildTarget &quot;pkg:lib:\&quot;comp\&quot;&quot;</span><span>
</span><span id="line-200"></span><span class="hs-comment">-- Right (UserBuildTargetTriple &quot;pkg&quot; &quot;lib&quot; &quot;comp&quot;)</span><span>
</span><span id="line-201"></span><span class="hs-comment">--</span><span>
</span><span id="line-202"></span><span class="hs-comment">-- &gt;&gt;&gt; readUserBuildTarget &quot;pkg:lib:comp:more&quot;</span><span>
</span><span id="line-203"></span><span class="hs-comment">-- Left (UserBuildTargetUnrecognised &quot;pkg:lib:comp:more&quot;)</span><span>
</span><span id="line-204"></span><span class="hs-comment">--</span><span>
</span><span id="line-205"></span><span class="hs-comment">-- &gt;&gt;&gt; readUserBuildTarget &quot;pkg:\&quot;lib\&quot;:comp&quot;</span><span>
</span><span id="line-206"></span><span class="hs-comment">-- Left (UserBuildTargetUnrecognised &quot;pkg:\&quot;lib\&quot;:comp&quot;)</span><span>
</span><span id="line-207"></span><span class="hs-comment">--</span><span>
</span><span id="line-208"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#readUserBuildTarget"><span class="hs-identifier hs-type">readUserBuildTarget</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetProblem"><span class="hs-identifier hs-type">UserBuildTargetProblem</span></a></span><span>
</span><span id="line-209"></span><span>                                        </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier hs-type">UserBuildTarget</span></a></span><span>
</span><span id="line-210"></span><span id="readUserBuildTarget"><span class="annot"><span class="annottext">readUserBuildTarget :: FilePath -&gt; Either UserBuildTargetProblem UserBuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#readUserBuildTarget"><span class="hs-identifier hs-var hs-var">readUserBuildTarget</span></a></span></span><span> </span><span id="local-6989586621679711482"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711482"><span class="hs-identifier hs-var">targetstr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-211"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ParsecParser UserBuildTarget
-&gt; FilePath -&gt; Either FilePath UserBuildTarget
forall a. ParsecParser a -&gt; FilePath -&gt; Either FilePath a
</span><a href="Distribution.Parsec.html#explicitEitherParsec"><span class="hs-identifier hs-var">explicitEitherParsec</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecParser UserBuildTarget
forall (m :: * -&gt; *). CabalParsing m =&gt; m UserBuildTarget
</span><a href="#local-6989586621679711480"><span class="hs-identifier hs-var">parseTargetApprox</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711482"><span class="hs-identifier hs-var">targetstr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-212"></span><span>      </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">UserBuildTargetProblem
-&gt; Either UserBuildTargetProblem UserBuildTarget
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; UserBuildTargetProblem
</span><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetUnrecognised"><span class="hs-identifier hs-var">UserBuildTargetUnrecognised</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711482"><span class="hs-identifier hs-var">targetstr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-213"></span><span>      </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679711478"><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711478"><span class="hs-identifier hs-var">tgt</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">UserBuildTarget -&gt; Either UserBuildTargetProblem UserBuildTarget
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711478"><span class="hs-identifier hs-var">tgt</span></a></span><span>
</span><span id="line-214"></span><span>
</span><span id="line-215"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-216"></span><span>    </span><span id="local-6989586621679712112"><span class="annot"><a href="#local-6989586621679711480"><span class="hs-identifier hs-type">parseTargetApprox</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Parsec.html#CabalParsing"><span class="hs-identifier hs-type">CabalParsing</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712112"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679712112"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier hs-type">UserBuildTarget</span></a></span></span><span>
</span><span id="line-217"></span><span>    </span><span id="local-6989586621679711480"><span class="annot"><span class="annottext">parseTargetApprox :: forall (m :: * -&gt; *). CabalParsing m =&gt; m UserBuildTarget
</span><a href="#local-6989586621679711480"><span class="hs-identifier hs-var hs-var">parseTargetApprox</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-218"></span><span>        </span><span class="hs-comment">-- read one, two, or three tokens, where last could be &quot;hs-string&quot;</span><span>
</span><span id="line-219"></span><span>        </span><span id="local-6989586621679711469"><span class="annot"><span class="annottext">(FilePath, Maybe (FilePath, Maybe FilePath))
</span><a href="#local-6989586621679711469"><span class="hs-identifier hs-var">ts</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m (FilePath, Maybe (FilePath, Maybe FilePath))
forall (m :: * -&gt; *).
CabalParsing m =&gt;
m (FilePath, Maybe (FilePath, Maybe FilePath))
</span><a href="#local-6989586621679711468"><span class="hs-identifier hs-var">tokens</span></a></span><span>
</span><span id="line-220"></span><span>        </span><span class="annot"><span class="annottext">UserBuildTarget -&gt; m UserBuildTarget
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(UserBuildTarget -&gt; m UserBuildTarget)
-&gt; UserBuildTarget -&gt; m UserBuildTarget
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(FilePath, Maybe (FilePath, Maybe FilePath))
</span><a href="#local-6989586621679711469"><span class="hs-identifier hs-var">ts</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-221"></span><span>            </span><span class="hs-special">(</span><span id="local-6989586621679711467"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711467"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (FilePath, Maybe FilePath)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; UserBuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetSingle"><span class="hs-identifier hs-var">UserBuildTargetSingle</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711467"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-222"></span><span>            </span><span class="hs-special">(</span><span id="local-6989586621679711466"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711466"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679711465"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711465"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe FilePath
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; UserBuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetDouble"><span class="hs-identifier hs-var">UserBuildTargetDouble</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711466"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711465"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-223"></span><span>            </span><span class="hs-special">(</span><span id="local-6989586621679711464"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711464"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679711463"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711463"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679711462"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711462"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath -&gt; UserBuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetTriple"><span class="hs-identifier hs-var">UserBuildTargetTriple</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711464"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711463"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711462"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-224"></span><span>
</span><span id="line-225"></span><span>    </span><span id="local-6989586621679712106"><span class="annot"><a href="#local-6989586621679711468"><span class="hs-identifier hs-type">tokens</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Parsec.html#CabalParsing"><span class="hs-identifier hs-type">CabalParsing</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712106"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679712106"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span><span>
</span><span id="line-226"></span><span>    </span><span id="local-6989586621679711468"><span class="annot"><span class="annottext">tokens :: forall (m :: * -&gt; *).
CabalParsing m =&gt;
m (FilePath, Maybe (FilePath, Maybe FilePath))
</span><a href="#local-6989586621679711468"><span class="hs-identifier hs-var hs-var">tokens</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679711440"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711440"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711440"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (FilePath, Maybe FilePath)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; (FilePath, Maybe (FilePath, Maybe FilePath)))
-&gt; m FilePath -&gt; m (FilePath, Maybe (FilePath, Maybe FilePath))
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m FilePath
forall (m :: * -&gt; *). CabalParsing m =&gt; m FilePath
</span><a href="Distribution.Parsec.html#parsecHaskellString"><span class="hs-identifier hs-var">parsecHaskellString</span></a></span><span>
</span><span id="line-227"></span><span>        </span><span class="annot"><span class="annottext">m (FilePath, Maybe (FilePath, Maybe FilePath))
-&gt; m (FilePath, Maybe (FilePath, Maybe FilePath))
-&gt; m (FilePath, Maybe (FilePath, Maybe FilePath))
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(FilePath
 -&gt; Maybe (FilePath, Maybe FilePath)
 -&gt; (FilePath, Maybe (FilePath, Maybe FilePath)))
-&gt; m FilePath
-&gt; m (Maybe (FilePath, Maybe FilePath)
      -&gt; (FilePath, Maybe (FilePath, Maybe FilePath)))
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m FilePath
forall (m :: * -&gt; *). CabalParsing m =&gt; m FilePath
</span><a href="#local-6989586621679711436"><span class="hs-identifier hs-var">token</span></a></span><span> </span><span class="annot"><span class="annottext">m (Maybe (FilePath, Maybe FilePath)
   -&gt; (FilePath, Maybe (FilePath, Maybe FilePath)))
-&gt; m (Maybe (FilePath, Maybe FilePath))
-&gt; m (FilePath, Maybe (FilePath, Maybe FilePath))
forall (f :: * -&gt; *) a b. Applicative f =&gt; f (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var">&lt;*&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m (FilePath, Maybe FilePath)
-&gt; m (Maybe (FilePath, Maybe FilePath))
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f (Maybe a)
</span><a href="../../base/src/Control.Applicative.html#optional"><span class="hs-identifier hs-var">P.optional</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; m Char
forall (m :: * -&gt; *). CharParsing m =&gt; Char -&gt; m Char
</span><a href="Distribution.Compat.CharParsing.html#char"><span class="hs-identifier hs-var">P.char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">':'</span></span><span> </span><span class="annot"><span class="annottext">m Char
-&gt; m (FilePath, Maybe FilePath) -&gt; m (FilePath, Maybe FilePath)
forall (f :: * -&gt; *) a b. Applicative f =&gt; f a -&gt; f b -&gt; f b
</span><a href="../../base/src/GHC.Base.html#%2A%3E"><span class="hs-operator hs-var">*&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m (FilePath, Maybe FilePath)
forall (m :: * -&gt; *).
CabalParsing m =&gt;
m (FilePath, Maybe FilePath)
</span><a href="#local-6989586621679711433"><span class="hs-identifier hs-var">tokens2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-228"></span><span>
</span><span id="line-229"></span><span>    </span><span id="local-6989586621679712083"><span class="annot"><a href="#local-6989586621679711433"><span class="hs-identifier hs-type">tokens2</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Parsec.html#CabalParsing"><span class="hs-identifier hs-type">CabalParsing</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712083"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679712083"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-230"></span><span>    </span><span id="local-6989586621679711433"><span class="annot"><span class="annottext">tokens2 :: forall (m :: * -&gt; *).
CabalParsing m =&gt;
m (FilePath, Maybe FilePath)
</span><a href="#local-6989586621679711433"><span class="hs-identifier hs-var hs-var">tokens2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679711414"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711414"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711414"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe FilePath
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; (FilePath, Maybe FilePath))
-&gt; m FilePath -&gt; m (FilePath, Maybe FilePath)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m FilePath
forall (m :: * -&gt; *). CabalParsing m =&gt; m FilePath
</span><a href="Distribution.Parsec.html#parsecHaskellString"><span class="hs-identifier hs-var">parsecHaskellString</span></a></span><span>
</span><span id="line-231"></span><span>        </span><span class="annot"><span class="annottext">m (FilePath, Maybe FilePath)
-&gt; m (FilePath, Maybe FilePath) -&gt; m (FilePath, Maybe FilePath)
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Maybe FilePath -&gt; (FilePath, Maybe FilePath))
-&gt; m FilePath -&gt; m (Maybe FilePath -&gt; (FilePath, Maybe FilePath))
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m FilePath
forall (m :: * -&gt; *). CabalParsing m =&gt; m FilePath
</span><a href="#local-6989586621679711436"><span class="hs-identifier hs-var">token</span></a></span><span> </span><span class="annot"><span class="annottext">m (Maybe FilePath -&gt; (FilePath, Maybe FilePath))
-&gt; m (Maybe FilePath) -&gt; m (FilePath, Maybe FilePath)
forall (f :: * -&gt; *) a b. Applicative f =&gt; f (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var">&lt;*&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m FilePath -&gt; m (Maybe FilePath)
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f (Maybe a)
</span><a href="../../base/src/Control.Applicative.html#optional"><span class="hs-identifier hs-var">P.optional</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; m Char
forall (m :: * -&gt; *). CharParsing m =&gt; Char -&gt; m Char
</span><a href="Distribution.Compat.CharParsing.html#char"><span class="hs-identifier hs-var">P.char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">':'</span></span><span> </span><span class="annot"><span class="annottext">m Char -&gt; m FilePath -&gt; m FilePath
forall (f :: * -&gt; *) a b. Applicative f =&gt; f a -&gt; f b -&gt; f b
</span><a href="../../base/src/GHC.Base.html#%2A%3E"><span class="hs-operator hs-var">*&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">m FilePath
forall (m :: * -&gt; *). CabalParsing m =&gt; m FilePath
</span><a href="Distribution.Parsec.html#parsecHaskellString"><span class="hs-identifier hs-var">parsecHaskellString</span></a></span><span> </span><span class="annot"><span class="annottext">m FilePath -&gt; m FilePath -&gt; m FilePath
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">m FilePath
forall (m :: * -&gt; *). CabalParsing m =&gt; m FilePath
</span><a href="#local-6989586621679711436"><span class="hs-identifier hs-var">token</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-232"></span><span>
</span><span id="line-233"></span><span>    </span><span id="local-6989586621679711413"><span class="annot"><a href="#local-6989586621679711436"><span class="hs-identifier hs-type">token</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Parsec.html#CabalParsing"><span class="hs-identifier hs-type">CabalParsing</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679711413"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679711413"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span></span><span>
</span><span id="line-234"></span><span>    </span><span id="local-6989586621679711436"><span class="annot"><span class="annottext">token :: forall (m :: * -&gt; *). CabalParsing m =&gt; m FilePath
</span><a href="#local-6989586621679711436"><span class="hs-identifier hs-var hs-var">token</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; m FilePath
forall (m :: * -&gt; *). CharParsing m =&gt; (Char -&gt; Bool) -&gt; m FilePath
</span><a href="Distribution.Compat.CharParsing.html#munch1"><span class="hs-identifier hs-var">P.munch1</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679711407"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679711407"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isSpace"><span class="hs-identifier hs-var">isSpace</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679711407"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679711407"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">':'</span></span><span class="hs-special">)</span><span>
</span><span id="line-235"></span><span>
</span><span id="line-236"></span><span class="hs-keyword">data</span><span> </span><span id="UserBuildTargetProblem"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetProblem"><span class="hs-identifier hs-var">UserBuildTargetProblem</span></a></span></span><span>
</span><span id="line-237"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span id="UserBuildTargetUnrecognised"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetUnrecognised"><span class="hs-identifier hs-var">UserBuildTargetUnrecognised</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-238"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span id="local-6989586621679711395"><span id="local-6989586621679711397"><span id="local-6989586621679711402"><span class="annot"><span class="annottext">Int -&gt; UserBuildTargetProblem -&gt; ShowS
[UserBuildTargetProblem] -&gt; ShowS
UserBuildTargetProblem -&gt; FilePath
(Int -&gt; UserBuildTargetProblem -&gt; ShowS)
-&gt; (UserBuildTargetProblem -&gt; FilePath)
-&gt; ([UserBuildTargetProblem] -&gt; ShowS)
-&gt; Show UserBuildTargetProblem
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; FilePath) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [UserBuildTargetProblem] -&gt; ShowS
$cshowList :: [UserBuildTargetProblem] -&gt; ShowS
show :: UserBuildTargetProblem -&gt; FilePath
$cshow :: UserBuildTargetProblem -&gt; FilePath
showsPrec :: Int -&gt; UserBuildTargetProblem -&gt; ShowS
$cshowsPrec :: Int -&gt; UserBuildTargetProblem -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span>
</span><span id="line-239"></span><span>
</span><span id="line-240"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#reportUserBuildTargetProblems"><span class="hs-identifier hs-type">reportUserBuildTargetProblems</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetProblem"><span class="hs-identifier hs-type">UserBuildTargetProblem</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-241"></span><span id="reportUserBuildTargetProblems"><span class="annot"><span class="annottext">reportUserBuildTargetProblems :: Verbosity -&gt; [UserBuildTargetProblem] -&gt; IO ()
</span><a href="Distribution.Simple.BuildTarget.html#reportUserBuildTargetProblems"><span class="hs-identifier hs-var hs-var">reportUserBuildTargetProblems</span></a></span></span><span> </span><span id="local-6989586621679711394"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679711394"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679711393"><span class="annot"><span class="annottext">[UserBuildTargetProblem]
</span><a href="#local-6989586621679711393"><span class="hs-identifier hs-var">problems</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-242"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711392"><span class="hs-identifier hs-var">target</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetUnrecognised"><span class="hs-identifier hs-type">UserBuildTargetUnrecognised</span></a></span><span> </span><span id="local-6989586621679711392"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711392"><span class="hs-identifier hs-var">target</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[UserBuildTargetProblem]
</span><a href="#local-6989586621679711393"><span class="hs-identifier hs-var">problems</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-243"></span><span>      </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-244"></span><span>      </span><span id="local-6989586621679711391"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679711391"><span class="hs-identifier hs-var">target</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-245"></span><span>        </span><span class="annot"><span class="annottext">Verbosity -&gt; FilePath -&gt; IO ()
forall a. Verbosity -&gt; FilePath -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679711394"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; IO ()) -&gt; FilePath -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; FilePath
</span><a href="../../base/src/Data.OldList.html#unlines"><span class="hs-identifier hs-var">unlines</span></a></span><span>
</span><span id="line-246"></span><span>                </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Unrecognised build target '&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711388"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;'.&quot;</span></span><span>
</span><span id="line-247"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679711388"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711388"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679711391"><span class="hs-identifier hs-var">target</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-248"></span><span>           </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Examples:\n&quot;</span></span><span>
</span><span id="line-249"></span><span>           </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; - build foo          -- component name &quot;</span></span><span>
</span><span id="line-250"></span><span>           </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;(library, executable, test-suite or benchmark)\n&quot;</span></span><span>
</span><span id="line-251"></span><span>           </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; - build Data.Foo     -- module name\n&quot;</span></span><span>
</span><span id="line-252"></span><span>           </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; - build Data/Foo.hsc -- file name\n&quot;</span></span><span>
</span><span id="line-253"></span><span>           </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; - build lib:foo exe:foo   -- component qualified by kind\n&quot;</span></span><span>
</span><span id="line-254"></span><span>           </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; - build foo:Data.Foo      -- module qualified by component\n&quot;</span></span><span>
</span><span id="line-255"></span><span>           </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; - build foo:Data/Foo.hsc  -- file qualified by component&quot;</span></span><span>
</span><span id="line-256"></span><span>
</span><span id="line-257"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#showUserBuildTarget"><span class="hs-identifier hs-type">showUserBuildTarget</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier hs-type">UserBuildTarget</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-258"></span><span id="showUserBuildTarget"><span class="annot"><span class="annottext">showUserBuildTarget :: UserBuildTarget -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#showUserBuildTarget"><span class="hs-identifier hs-var hs-var">showUserBuildTarget</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath] -&gt; FilePath
forall a. [a] -&gt; [[a]] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#intercalate"><span class="hs-identifier hs-var">intercalate</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;:&quot;</span></span><span> </span><span class="annot"><span class="annottext">([FilePath] -&gt; FilePath)
-&gt; (UserBuildTarget -&gt; [FilePath]) -&gt; UserBuildTarget -&gt; FilePath
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">UserBuildTarget -&gt; [FilePath]
</span><a href="#local-6989586621679711386"><span class="hs-identifier hs-var">getComponents</span></a></span><span>
</span><span id="line-259"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-260"></span><span>    </span><span id="local-6989586621679711386"><span class="annot"><span class="annottext">getComponents :: UserBuildTarget -&gt; [FilePath]
</span><a href="#local-6989586621679711386"><span class="hs-identifier hs-var hs-var">getComponents</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetSingle"><span class="hs-identifier hs-type">UserBuildTargetSingle</span></a></span><span> </span><span id="local-6989586621679711385"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711385"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711385"><span class="hs-identifier hs-var">s1</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-261"></span><span>    </span><span class="annot"><a href="#local-6989586621679711386"><span class="hs-identifier hs-var">getComponents</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetDouble"><span class="hs-identifier hs-type">UserBuildTargetDouble</span></a></span><span> </span><span id="local-6989586621679711384"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711384"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span id="local-6989586621679711383"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711383"><span class="hs-identifier hs-var">s2</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711384"><span class="hs-identifier hs-var">s1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711383"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-262"></span><span>    </span><span class="annot"><a href="#local-6989586621679711386"><span class="hs-identifier hs-var">getComponents</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetTriple"><span class="hs-identifier hs-type">UserBuildTargetTriple</span></a></span><span> </span><span id="local-6989586621679711382"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711382"><span class="hs-identifier hs-var">s1</span></a></span></span><span> </span><span id="local-6989586621679711381"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711381"><span class="hs-identifier hs-var">s2</span></a></span></span><span> </span><span id="local-6989586621679711380"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711380"><span class="hs-identifier hs-var">s3</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711382"><span class="hs-identifier hs-var">s1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711381"><span class="hs-identifier hs-var">s2</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711380"><span class="hs-identifier hs-var">s3</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-263"></span><span>
</span><span id="line-264"></span><span class="hs-comment">-- | Unless you use 'QL1', this function is PARTIAL;</span><span>
</span><span id="line-265"></span><span class="hs-comment">-- use 'showBuildTarget' instead.</span><span>
</span><span id="line-266"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#showBuildTarget%27"><span class="hs-identifier hs-type">showBuildTarget'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#QualLevel"><span class="hs-identifier hs-type">QualLevel</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageId"><span class="hs-identifier hs-type">PackageId</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-267"></span><span id="showBuildTarget%27"><span class="annot"><span class="annottext">showBuildTarget' :: QualLevel -&gt; PackageId -&gt; BuildTarget -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#showBuildTarget%27"><span class="hs-identifier hs-var hs-var">showBuildTarget'</span></a></span></span><span> </span><span id="local-6989586621679711378"><span class="annot"><span class="annottext">QualLevel
</span><a href="#local-6989586621679711378"><span class="hs-identifier hs-var">ql</span></a></span></span><span> </span><span id="local-6989586621679711377"><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679711377"><span class="hs-identifier hs-var">pkgid</span></a></span></span><span> </span><span id="local-6989586621679711376"><span class="annot"><span class="annottext">BuildTarget
</span><a href="#local-6989586621679711376"><span class="hs-identifier hs-var">bt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-268"></span><span>    </span><span class="annot"><span class="annottext">UserBuildTarget -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#showUserBuildTarget"><span class="hs-identifier hs-var">showUserBuildTarget</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">QualLevel -&gt; BuildTarget -&gt; PackageId -&gt; UserBuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#renderBuildTarget"><span class="hs-identifier hs-var">renderBuildTarget</span></a></span><span> </span><span class="annot"><span class="annottext">QualLevel
</span><a href="#local-6989586621679711378"><span class="hs-identifier hs-var">ql</span></a></span><span> </span><span class="annot"><span class="annottext">BuildTarget
</span><a href="#local-6989586621679711376"><span class="hs-identifier hs-var">bt</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679711377"><span class="hs-identifier hs-var">pkgid</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-269"></span><span>
</span><span id="line-270"></span><span class="hs-comment">-- | Unambiguously render a 'BuildTarget', so that it can</span><span>
</span><span id="line-271"></span><span class="hs-comment">-- be parsed in all situations.</span><span>
</span><span id="line-272"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#showBuildTarget"><span class="hs-identifier hs-type">showBuildTarget</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageId"><span class="hs-identifier hs-type">PackageId</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-273"></span><span id="showBuildTarget"><span class="annot"><span class="annottext">showBuildTarget :: PackageId -&gt; BuildTarget -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#showBuildTarget"><span class="hs-identifier hs-var hs-var">showBuildTarget</span></a></span></span><span> </span><span id="local-6989586621679711374"><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679711374"><span class="hs-identifier hs-var">pkgid</span></a></span></span><span> </span><span id="local-6989586621679711373"><span class="annot"><span class="annottext">BuildTarget
</span><a href="#local-6989586621679711373"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-274"></span><span>    </span><span class="annot"><span class="annottext">QualLevel -&gt; PackageId -&gt; BuildTarget -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#showBuildTarget%27"><span class="hs-identifier hs-var">showBuildTarget'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BuildTarget -&gt; QualLevel
</span><a href="#local-6989586621679711372"><span class="hs-identifier hs-var">qlBuildTarget</span></a></span><span> </span><span class="annot"><span class="annottext">BuildTarget
</span><a href="#local-6989586621679711373"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679711374"><span class="hs-identifier hs-var">pkgid</span></a></span><span> </span><span class="annot"><span class="annottext">BuildTarget
</span><a href="#local-6989586621679711373"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-275"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-276"></span><span>    </span><span id="local-6989586621679711372"><span class="annot"><span class="annottext">qlBuildTarget :: BuildTarget -&gt; QualLevel
</span><a href="#local-6989586621679711372"><span class="hs-identifier hs-var hs-var">qlBuildTarget</span></a></span></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetComponent"><span class="hs-identifier hs-type">BuildTargetComponent</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">QualLevel
</span><a href="Distribution.Simple.BuildTarget.html#QL2"><span class="hs-identifier hs-var">QL2</span></a></span><span>
</span><span id="line-277"></span><span>    </span><span class="annot"><a href="#local-6989586621679711372"><span class="hs-identifier hs-var">qlBuildTarget</span></a></span><span> </span><span class="annot"><span class="annottext">BuildTarget
</span><span class="hs-identifier">_</span></span><span>                      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">QualLevel
</span><a href="Distribution.Simple.BuildTarget.html#QL3"><span class="hs-identifier hs-var">QL3</span></a></span><span>
</span><span id="line-278"></span><span>
</span><span id="line-279"></span><span>
</span><span id="line-280"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-281"></span><span class="hs-comment">-- * Resolving user targets to build targets</span><span>
</span><span id="line-282"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-283"></span><span>
</span><span id="line-284"></span><span class="hs-comment">{-
stargets =
  [ BuildTargetComponent (CExeName &quot;foo&quot;)
  , BuildTargetModule    (CExeName &quot;foo&quot;) (mkMn &quot;Foo&quot;)
  , BuildTargetModule    (CExeName &quot;tst&quot;) (mkMn &quot;Foo&quot;)
  ]
    where
    mkMn :: String -&gt; ModuleName
    mkMn  = fromJust . simpleParse

ex_pkgid :: PackageIdentifier
Just ex_pkgid = simpleParse &quot;thelib&quot;
-}</span><span>
</span><span id="line-297"></span><span>
</span><span id="line-298"></span><span class="hs-comment">-- | Given a bunch of user-specified targets, try to resolve what it is they</span><span>
</span><span id="line-299"></span><span class="hs-comment">-- refer to.</span><span>
</span><span id="line-300"></span><span class="hs-comment">--</span><span>
</span><span id="line-301"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#resolveBuildTargets"><span class="hs-identifier hs-type">resolveBuildTargets</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-302"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier hs-type">UserBuildTarget</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-303"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetProblem"><span class="hs-identifier hs-type">BuildTargetProblem</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-304"></span><span id="resolveBuildTargets"><span class="annot"><span class="annottext">resolveBuildTargets :: PackageDescription
-&gt; [(UserBuildTarget, Bool)]
-&gt; ([BuildTargetProblem], [BuildTarget])
</span><a href="Distribution.Simple.BuildTarget.html#resolveBuildTargets"><span class="hs-identifier hs-var hs-var">resolveBuildTargets</span></a></span></span><span> </span><span id="local-6989586621679711369"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679711369"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Either BuildTargetProblem BuildTarget]
-&gt; ([BuildTargetProblem], [BuildTarget])
forall a b. [Either a b] -&gt; ([a], [b])
</span><a href="../../base/src/Data.Either.html#partitionEithers"><span class="hs-identifier hs-var">partitionEithers</span></a></span><span>
</span><span id="line-305"></span><span>                        </span><span class="annot"><span class="annottext">([Either BuildTargetProblem BuildTarget]
 -&gt; ([BuildTargetProblem], [BuildTarget]))
-&gt; ([(UserBuildTarget, Bool)]
    -&gt; [Either BuildTargetProblem BuildTarget])
-&gt; [(UserBuildTarget, Bool)]
-&gt; ([BuildTargetProblem], [BuildTarget])
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">((UserBuildTarget, Bool) -&gt; Either BuildTargetProblem BuildTarget)
-&gt; [(UserBuildTarget, Bool)]
-&gt; [Either BuildTargetProblem BuildTarget]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(UserBuildTarget -&gt; Bool -&gt; Either BuildTargetProblem BuildTarget)
-&gt; (UserBuildTarget, Bool) -&gt; Either BuildTargetProblem BuildTarget
forall a b c. (a -&gt; b -&gt; c) -&gt; (a, b) -&gt; c
</span><a href="../../base/src/Data.Tuple.html#uncurry"><span class="hs-identifier hs-var">uncurry</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription
-&gt; UserBuildTarget -&gt; Bool -&gt; Either BuildTargetProblem BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#resolveBuildTarget"><span class="hs-identifier hs-var">resolveBuildTarget</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679711369"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-306"></span><span>
</span><span id="line-307"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#resolveBuildTarget"><span class="hs-identifier hs-type">resolveBuildTarget</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier hs-type">UserBuildTarget</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-308"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetProblem"><span class="hs-identifier hs-type">BuildTargetProblem</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span>
</span><span id="line-309"></span><span id="resolveBuildTarget"><span class="annot"><span class="annottext">resolveBuildTarget :: PackageDescription
-&gt; UserBuildTarget -&gt; Bool -&gt; Either BuildTargetProblem BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#resolveBuildTarget"><span class="hs-identifier hs-var hs-var">resolveBuildTarget</span></a></span></span><span> </span><span id="local-6989586621679711366"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679711366"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span id="local-6989586621679711365"><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711365"><span class="hs-identifier hs-var">userTarget</span></a></span></span><span> </span><span id="local-6989586621679711364"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679711364"><span class="hs-identifier hs-var">fexists</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-310"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Match BuildTarget -&gt; MaybeAmbiguous BuildTarget
forall b. Eq b =&gt; Match b -&gt; MaybeAmbiguous b
</span><a href="Distribution.Simple.BuildTarget.html#findMatch"><span class="hs-identifier hs-var">findMatch</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription -&gt; UserBuildTarget -&gt; Bool -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchBuildTarget"><span class="hs-identifier hs-var">matchBuildTarget</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679711366"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711365"><span class="hs-identifier hs-var">userTarget</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679711364"><span class="hs-identifier hs-var">fexists</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-311"></span><span>      </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Unambiguous"><span class="hs-identifier hs-type">Unambiguous</span></a></span><span> </span><span id="local-6989586621679711360"><span class="annot"><span class="annottext">BuildTarget
</span><a href="#local-6989586621679711360"><span class="hs-identifier hs-var">target</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BuildTarget -&gt; Either BuildTargetProblem BuildTarget
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">BuildTarget
</span><a href="#local-6989586621679711360"><span class="hs-identifier hs-var">target</span></a></span><span>
</span><span id="line-312"></span><span>      </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Ambiguous"><span class="hs-identifier hs-type">Ambiguous</span></a></span><span>   </span><span id="local-6989586621679711358"><span class="annot"><span class="annottext">[BuildTarget]
</span><a href="#local-6989586621679711358"><span class="hs-identifier hs-var">targets</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BuildTargetProblem -&gt; Either BuildTargetProblem BuildTarget
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UserBuildTarget
-&gt; [(UserBuildTarget, BuildTarget)] -&gt; BuildTargetProblem
</span><a href="Distribution.Simple.BuildTarget.html#BuildTargetAmbiguous"><span class="hs-identifier hs-var">BuildTargetAmbiguous</span></a></span><span> </span><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711365"><span class="hs-identifier hs-var">userTarget</span></a></span><span> </span><span class="annot"><span class="annottext">[(UserBuildTarget, BuildTarget)]
</span><a href="#local-6989586621679711356"><span class="hs-identifier hs-var">targets'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-313"></span><span>                               </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679711356"><span class="annot"><span class="annottext">targets' :: [(UserBuildTarget, BuildTarget)]
</span><a href="#local-6989586621679711356"><span class="hs-identifier hs-var hs-var">targets'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageId
-&gt; UserBuildTarget
-&gt; [BuildTarget]
-&gt; [(UserBuildTarget, BuildTarget)]
</span><a href="Distribution.Simple.BuildTarget.html#disambiguateBuildTargets"><span class="hs-identifier hs-var">disambiguateBuildTargets</span></a></span><span>
</span><span id="line-314"></span><span>                                                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription -&gt; PackageId
forall pkg. Package pkg =&gt; pkg -&gt; PackageId
</span><a href="Distribution.Package.html#packageId"><span class="hs-identifier hs-var">packageId</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679711366"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-315"></span><span>                                                    </span><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711365"><span class="hs-identifier hs-var">userTarget</span></a></span><span>
</span><span id="line-316"></span><span>                                                    </span><span class="annot"><span class="annottext">[BuildTarget]
</span><a href="#local-6989586621679711358"><span class="hs-identifier hs-var">targets</span></a></span><span>
</span><span id="line-317"></span><span>      </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#None"><span class="hs-identifier hs-type">None</span></a></span><span>        </span><span id="local-6989586621679711351"><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679711351"><span class="hs-identifier hs-var">errs</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BuildTargetProblem -&gt; Either BuildTargetProblem BuildTarget
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[MatchError] -&gt; BuildTargetProblem
</span><a href="#local-6989586621679711350"><span class="hs-identifier hs-var">classifyMatchErrors</span></a></span><span> </span><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679711351"><span class="hs-identifier hs-var">errs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-318"></span><span>
</span><span id="line-319"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-320"></span><span>    </span><span id="local-6989586621679711350"><span class="annot"><span class="annottext">classifyMatchErrors :: [MatchError] -&gt; BuildTargetProblem
</span><a href="#local-6989586621679711350"><span class="hs-identifier hs-var hs-var">classifyMatchErrors</span></a></span></span><span> </span><span id="local-6989586621679711346"><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679711346"><span class="hs-identifier hs-var">errs</span></a></span></span><span>
</span><span id="line-321"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679711345"><span class="annot"><span class="annottext">NonEmpty (FilePath, FilePath)
</span><a href="#local-6989586621679711345"><span class="hs-identifier hs-var">expected'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(FilePath, FilePath)] -&gt; Maybe (NonEmpty (FilePath, FilePath))
forall a. [a] -&gt; Maybe (NonEmpty a)
</span><a href="../../base/src/Data.List.NonEmpty.html#nonEmpty"><span class="hs-identifier hs-var">NE.nonEmpty</span></a></span><span> </span><span class="annot"><span class="annottext">[(FilePath, FilePath)]
</span><a href="#local-6989586621679711343"><span class="hs-identifier hs-var">expected</span></a></span><span>
</span><span id="line-322"></span><span>                            </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679711340"><span class="annot"><span class="annottext">NonEmpty FilePath
</span><a href="#local-6989586621679711340"><span class="hs-identifier hs-var">things</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711339"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711339"><span class="hs-identifier hs-var">got</span></a></span></span><span class="annot"><a href="../../base/src/GHC.Base.html#%3A%7C"><span class="hs-operator hs-type">:|</span></a></span><span class="annot"><span class="annottext">[FilePath]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NonEmpty (FilePath, FilePath)
-&gt; (NonEmpty FilePath, NonEmpty FilePath)
forall (f :: * -&gt; *) a b. Functor f =&gt; f (a, b) -&gt; (f a, f b)
</span><a href="../../base/src/Data.List.NonEmpty.html#unzip"><span class="hs-identifier hs-var">NE.unzip</span></a></span><span> </span><span class="annot"><span class="annottext">NonEmpty (FilePath, FilePath)
</span><a href="#local-6989586621679711345"><span class="hs-identifier hs-var">expected'</span></a></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-323"></span><span>                              </span><span class="annot"><span class="annottext">UserBuildTarget -&gt; [FilePath] -&gt; FilePath -&gt; BuildTargetProblem
</span><a href="Distribution.Simple.BuildTarget.html#BuildTargetExpected"><span class="hs-identifier hs-var">BuildTargetExpected</span></a></span><span> </span><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711365"><span class="hs-identifier hs-var">userTarget</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NonEmpty FilePath -&gt; [FilePath]
forall a. NonEmpty a -&gt; [a]
</span><a href="../../base/src/Data.List.NonEmpty.html#toList"><span class="hs-identifier hs-var">NE.toList</span></a></span><span> </span><span class="annot"><span class="annottext">NonEmpty FilePath
</span><a href="#local-6989586621679711340"><span class="hs-identifier hs-var">things</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711339"><span class="hs-identifier hs-var">got</span></a></span><span>
</span><span id="line-324"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[(FilePath, FilePath)] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[(FilePath, FilePath)]
</span><a href="#local-6989586621679711333"><span class="hs-identifier hs-var">nosuch</span></a></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UserBuildTarget -&gt; [(FilePath, FilePath)] -&gt; BuildTargetProblem
</span><a href="Distribution.Simple.BuildTarget.html#BuildTargetNoSuch"><span class="hs-identifier hs-var">BuildTargetNoSuch</span></a></span><span>   </span><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711365"><span class="hs-identifier hs-var">userTarget</span></a></span><span> </span><span class="annot"><span class="annottext">[(FilePath, FilePath)]
</span><a href="#local-6989586621679711333"><span class="hs-identifier hs-var">nosuch</span></a></span><span>
</span><span id="line-325"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; BuildTargetProblem
forall a. HasCallStack =&gt; FilePath -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; BuildTargetProblem) -&gt; FilePath -&gt; BuildTargetProblem
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;resolveBuildTarget: internal error in matching&quot;</span></span><span>
</span><span id="line-326"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-327"></span><span>        </span><span id="local-6989586621679711343"><span class="annot"><span class="annottext">expected :: [(FilePath, FilePath)]
</span><a href="#local-6989586621679711343"><span class="hs-identifier hs-var hs-var">expected</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711330"><span class="hs-identifier hs-var">thing</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711329"><span class="hs-identifier hs-var">got</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#MatchErrorExpected"><span class="hs-identifier hs-type">MatchErrorExpected</span></a></span><span> </span><span id="local-6989586621679711330"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711330"><span class="hs-identifier hs-var">thing</span></a></span></span><span> </span><span id="local-6989586621679711329"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711329"><span class="hs-identifier hs-var">got</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679711346"><span class="hs-identifier hs-var">errs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-328"></span><span>        </span><span id="local-6989586621679711333"><span class="annot"><span class="annottext">nosuch :: [(FilePath, FilePath)]
</span><a href="#local-6989586621679711333"><span class="hs-identifier hs-var hs-var">nosuch</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711327"><span class="hs-identifier hs-var">thing</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711326"><span class="hs-identifier hs-var">got</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#MatchErrorNoSuch"><span class="hs-identifier hs-type">MatchErrorNoSuch</span></a></span><span>   </span><span id="local-6989586621679711327"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711327"><span class="hs-identifier hs-var">thing</span></a></span></span><span> </span><span id="local-6989586621679711326"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711326"><span class="hs-identifier hs-var">got</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679711346"><span class="hs-identifier hs-var">errs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-329"></span><span>
</span><span id="line-330"></span><span>
</span><span id="line-331"></span><span class="hs-keyword">data</span><span> </span><span id="BuildTargetProblem"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetProblem"><span class="hs-identifier hs-var">BuildTargetProblem</span></a></span></span><span>
</span><span id="line-332"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span id="BuildTargetExpected"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetExpected"><span class="hs-identifier hs-var">BuildTargetExpected</span></a></span></span><span>  </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier hs-type">UserBuildTarget</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>  </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-333"></span><span>     </span><span class="hs-comment">-- ^  [expected thing] (actually got)</span><span>
</span><span id="line-334"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="BuildTargetNoSuch"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetNoSuch"><span class="hs-identifier hs-var">BuildTargetNoSuch</span></a></span></span><span>    </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier hs-type">UserBuildTarget</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-335"></span><span>     </span><span class="hs-comment">-- ^ [(no such thing,  actually got)]</span><span>
</span><span id="line-336"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span id="BuildTargetAmbiguous"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetAmbiguous"><span class="hs-identifier hs-var">BuildTargetAmbiguous</span></a></span></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier hs-type">UserBuildTarget</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier hs-type">UserBuildTarget</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-337"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span id="local-6989586621679711306"><span id="local-6989586621679711308"><span id="local-6989586621679711323"><span class="annot"><span class="annottext">Int -&gt; BuildTargetProblem -&gt; ShowS
[BuildTargetProblem] -&gt; ShowS
BuildTargetProblem -&gt; FilePath
(Int -&gt; BuildTargetProblem -&gt; ShowS)
-&gt; (BuildTargetProblem -&gt; FilePath)
-&gt; ([BuildTargetProblem] -&gt; ShowS)
-&gt; Show BuildTargetProblem
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; FilePath) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [BuildTargetProblem] -&gt; ShowS
$cshowList :: [BuildTargetProblem] -&gt; ShowS
show :: BuildTargetProblem -&gt; FilePath
$cshow :: BuildTargetProblem -&gt; FilePath
showsPrec :: Int -&gt; BuildTargetProblem -&gt; ShowS
$cshowsPrec :: Int -&gt; BuildTargetProblem -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span>
</span><span id="line-338"></span><span>
</span><span id="line-339"></span><span>
</span><span id="line-340"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#disambiguateBuildTargets"><span class="hs-identifier hs-type">disambiguateBuildTargets</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageId"><span class="hs-identifier hs-type">PackageId</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier hs-type">UserBuildTarget</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-341"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier hs-type">UserBuildTarget</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-342"></span><span id="disambiguateBuildTargets"><span class="annot"><span class="annottext">disambiguateBuildTargets :: PackageId
-&gt; UserBuildTarget
-&gt; [BuildTarget]
-&gt; [(UserBuildTarget, BuildTarget)]
</span><a href="Distribution.Simple.BuildTarget.html#disambiguateBuildTargets"><span class="hs-identifier hs-var hs-var">disambiguateBuildTargets</span></a></span></span><span> </span><span id="local-6989586621679711302"><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679711302"><span class="hs-identifier hs-var">pkgid</span></a></span></span><span> </span><span id="local-6989586621679711301"><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711301"><span class="hs-identifier hs-var">original</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-343"></span><span>    </span><span class="annot"><span class="annottext">QualLevel -&gt; [BuildTarget] -&gt; [(UserBuildTarget, BuildTarget)]
</span><a href="#local-6989586621679711300"><span class="hs-identifier hs-var">disambiguate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UserBuildTarget -&gt; QualLevel
</span><a href="#local-6989586621679711299"><span class="hs-identifier hs-var">userTargetQualLevel</span></a></span><span> </span><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711301"><span class="hs-identifier hs-var">original</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-344"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-345"></span><span>    </span><span id="local-6989586621679711300"><span class="annot"><span class="annottext">disambiguate :: QualLevel -&gt; [BuildTarget] -&gt; [(UserBuildTarget, BuildTarget)]
</span><a href="#local-6989586621679711300"><span class="hs-identifier hs-var hs-var">disambiguate</span></a></span></span><span> </span><span id="local-6989586621679711296"><span class="annot"><span class="annottext">QualLevel
</span><a href="#local-6989586621679711296"><span class="hs-identifier hs-var">ql</span></a></span></span><span> </span><span id="local-6989586621679711295"><span class="annot"><span class="annottext">[BuildTarget]
</span><a href="#local-6989586621679711295"><span class="hs-identifier hs-var">ts</span></a></span></span><span>
</span><span id="line-346"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[BuildTarget] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[BuildTarget]
</span><a href="#local-6989586621679711294"><span class="hs-identifier hs-var">amb</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(UserBuildTarget, BuildTarget)]
</span><a href="#local-6989586621679711293"><span class="hs-identifier hs-var">unamb</span></a></span><span>
</span><span id="line-347"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(UserBuildTarget, BuildTarget)]
</span><a href="#local-6989586621679711293"><span class="hs-identifier hs-var">unamb</span></a></span><span> </span><span class="annot"><span class="annottext">[(UserBuildTarget, BuildTarget)]
-&gt; [(UserBuildTarget, BuildTarget)]
-&gt; [(UserBuildTarget, BuildTarget)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">QualLevel -&gt; [BuildTarget] -&gt; [(UserBuildTarget, BuildTarget)]
</span><a href="#local-6989586621679711300"><span class="hs-identifier hs-var">disambiguate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">QualLevel -&gt; QualLevel
forall a. Enum a =&gt; a -&gt; a
</span><a href="../../base/src/GHC.Enum.html#succ"><span class="hs-identifier hs-var">succ</span></a></span><span> </span><span class="annot"><span class="annottext">QualLevel
</span><a href="#local-6989586621679711296"><span class="hs-identifier hs-var">ql</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[BuildTarget]
</span><a href="#local-6989586621679711294"><span class="hs-identifier hs-var">amb</span></a></span><span>
</span><span id="line-348"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-349"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621679711294"><span class="annot"><span class="annottext">[BuildTarget]
</span><a href="#local-6989586621679711294"><span class="hs-identifier hs-var">amb</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711293"><span class="annot"><span class="annottext">[(UserBuildTarget, BuildTarget)]
</span><a href="#local-6989586621679711293"><span class="hs-identifier hs-var">unamb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">QualLevel
-&gt; [BuildTarget]
-&gt; ([BuildTarget], [(UserBuildTarget, BuildTarget)])
</span><a href="#local-6989586621679711291"><span class="hs-identifier hs-var">step</span></a></span><span> </span><span class="annot"><span class="annottext">QualLevel
</span><a href="#local-6989586621679711296"><span class="hs-identifier hs-var">ql</span></a></span><span> </span><span class="annot"><span class="annottext">[BuildTarget]
</span><a href="#local-6989586621679711295"><span class="hs-identifier hs-var">ts</span></a></span><span>
</span><span id="line-350"></span><span>
</span><span id="line-351"></span><span>    </span><span id="local-6989586621679711299"><span class="annot"><span class="annottext">userTargetQualLevel :: UserBuildTarget -&gt; QualLevel
</span><a href="#local-6989586621679711299"><span class="hs-identifier hs-var hs-var">userTargetQualLevel</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetSingle"><span class="hs-identifier hs-type">UserBuildTargetSingle</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">QualLevel
</span><a href="Distribution.Simple.BuildTarget.html#QL1"><span class="hs-identifier hs-var">QL1</span></a></span><span>
</span><span id="line-352"></span><span>    </span><span class="annot"><a href="#local-6989586621679711299"><span class="hs-identifier hs-var">userTargetQualLevel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetDouble"><span class="hs-identifier hs-type">UserBuildTargetDouble</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">QualLevel
</span><a href="Distribution.Simple.BuildTarget.html#QL2"><span class="hs-identifier hs-var">QL2</span></a></span><span>
</span><span id="line-353"></span><span>    </span><span class="annot"><a href="#local-6989586621679711299"><span class="hs-identifier hs-var">userTargetQualLevel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetTriple"><span class="hs-identifier hs-type">UserBuildTargetTriple</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">QualLevel
</span><a href="Distribution.Simple.BuildTarget.html#QL3"><span class="hs-identifier hs-var">QL3</span></a></span><span>
</span><span id="line-354"></span><span>
</span><span id="line-355"></span><span>    </span><span class="annot"><a href="#local-6989586621679711291"><span class="hs-identifier hs-type">step</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#QualLevel"><span class="hs-identifier hs-type">QualLevel</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-356"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier hs-type">UserBuildTarget</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-357"></span><span>    </span><span id="local-6989586621679711291"><span class="annot"><span class="annottext">step :: QualLevel
-&gt; [BuildTarget]
-&gt; ([BuildTarget], [(UserBuildTarget, BuildTarget)])
</span><a href="#local-6989586621679711291"><span class="hs-identifier hs-var hs-var">step</span></a></span></span><span> </span><span id="local-6989586621679711289"><span class="annot"><span class="annottext">QualLevel
</span><a href="#local-6989586621679711289"><span class="hs-identifier hs-var">ql</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679711288"><span class="annot"><span class="annottext">[[(UserBuildTarget, BuildTarget)]]
</span><a href="#local-6989586621679711288"><span class="hs-identifier hs-var">amb</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711287"><span class="annot"><span class="annottext">[[(UserBuildTarget, BuildTarget)]]
</span><a href="#local-6989586621679711287"><span class="hs-identifier hs-var">unamb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((UserBuildTarget, BuildTarget) -&gt; BuildTarget)
-&gt; [(UserBuildTarget, BuildTarget)] -&gt; [BuildTarget]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(UserBuildTarget, BuildTarget) -&gt; BuildTarget
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="annot"><span class="annottext">([(UserBuildTarget, BuildTarget)] -&gt; [BuildTarget])
-&gt; [(UserBuildTarget, BuildTarget)] -&gt; [BuildTarget]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[[(UserBuildTarget, BuildTarget)]]
-&gt; [(UserBuildTarget, BuildTarget)]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="annot"><span class="annottext">[[(UserBuildTarget, BuildTarget)]]
</span><a href="#local-6989586621679711288"><span class="hs-identifier hs-var">amb</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[[(UserBuildTarget, BuildTarget)]]
-&gt; [(UserBuildTarget, BuildTarget)]
forall (t :: * -&gt; *) a. Foldable t =&gt; t [a] -&gt; [a]
</span><a href="../../base/src/Data.Foldable.html#concat"><span class="hs-identifier hs-var">concat</span></a></span><span> </span><span class="annot"><span class="annottext">[[(UserBuildTarget, BuildTarget)]]
</span><a href="#local-6989586621679711287"><span class="hs-identifier hs-var">unamb</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-358"></span><span>            </span><span class="annot"><span class="annottext">(([[(UserBuildTarget, BuildTarget)]],
  [[(UserBuildTarget, BuildTarget)]])
 -&gt; ([BuildTarget], [(UserBuildTarget, BuildTarget)]))
-&gt; ([BuildTarget]
    -&gt; ([[(UserBuildTarget, BuildTarget)]],
        [[(UserBuildTarget, BuildTarget)]]))
-&gt; [BuildTarget]
-&gt; ([BuildTarget], [(UserBuildTarget, BuildTarget)])
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">([(UserBuildTarget, BuildTarget)] -&gt; Bool)
-&gt; [[(UserBuildTarget, BuildTarget)]]
-&gt; ([[(UserBuildTarget, BuildTarget)]],
    [[(UserBuildTarget, BuildTarget)]])
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="../../base/src/Data.OldList.html#partition"><span class="hs-identifier hs-var">partition</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679711284"><span class="annot"><span class="annottext">[(UserBuildTarget, BuildTarget)]
</span><a href="#local-6989586621679711284"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[(UserBuildTarget, BuildTarget)] -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[(UserBuildTarget, BuildTarget)]
</span><a href="#local-6989586621679711284"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span>
</span><span id="line-359"></span><span>            </span><span class="annot"><span class="annottext">([[(UserBuildTarget, BuildTarget)]]
 -&gt; ([[(UserBuildTarget, BuildTarget)]],
     [[(UserBuildTarget, BuildTarget)]]))
-&gt; ([BuildTarget] -&gt; [[(UserBuildTarget, BuildTarget)]])
-&gt; [BuildTarget]
-&gt; ([[(UserBuildTarget, BuildTarget)]],
    [[(UserBuildTarget, BuildTarget)]])
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">((UserBuildTarget, BuildTarget)
 -&gt; (UserBuildTarget, BuildTarget) -&gt; Bool)
-&gt; [(UserBuildTarget, BuildTarget)]
-&gt; [[(UserBuildTarget, BuildTarget)]]
forall a. (a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [[a]]
</span><a href="../../base/src/Data.OldList.html#groupBy"><span class="hs-identifier hs-var">groupBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((UserBuildTarget, BuildTarget) -&gt; UserBuildTarget)
-&gt; (UserBuildTarget, BuildTarget)
-&gt; (UserBuildTarget, BuildTarget)
-&gt; Bool
forall a b. Eq a =&gt; (b -&gt; a) -&gt; b -&gt; b -&gt; Bool
</span><a href="Distribution.Utils.Generic.html#equating"><span class="hs-identifier hs-var">equating</span></a></span><span> </span><span class="annot"><span class="annottext">(UserBuildTarget, BuildTarget) -&gt; UserBuildTarget
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-360"></span><span>            </span><span class="annot"><span class="annottext">([(UserBuildTarget, BuildTarget)]
 -&gt; [[(UserBuildTarget, BuildTarget)]])
-&gt; ([BuildTarget] -&gt; [(UserBuildTarget, BuildTarget)])
-&gt; [BuildTarget]
-&gt; [[(UserBuildTarget, BuildTarget)]]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">((UserBuildTarget, BuildTarget)
 -&gt; (UserBuildTarget, BuildTarget) -&gt; Ordering)
-&gt; [(UserBuildTarget, BuildTarget)]
-&gt; [(UserBuildTarget, BuildTarget)]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((UserBuildTarget, BuildTarget) -&gt; UserBuildTarget)
-&gt; (UserBuildTarget, BuildTarget)
-&gt; (UserBuildTarget, BuildTarget)
-&gt; Ordering
forall a b. Ord a =&gt; (b -&gt; a) -&gt; b -&gt; b -&gt; Ordering
</span><a href="../../base/src/Data.Ord.html#comparing"><span class="hs-identifier hs-var">comparing</span></a></span><span> </span><span class="annot"><span class="annottext">(UserBuildTarget, BuildTarget) -&gt; UserBuildTarget
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-361"></span><span>            </span><span class="annot"><span class="annottext">([(UserBuildTarget, BuildTarget)]
 -&gt; [(UserBuildTarget, BuildTarget)])
-&gt; ([BuildTarget] -&gt; [(UserBuildTarget, BuildTarget)])
-&gt; [BuildTarget]
-&gt; [(UserBuildTarget, BuildTarget)]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(BuildTarget -&gt; (UserBuildTarget, BuildTarget))
-&gt; [BuildTarget] -&gt; [(UserBuildTarget, BuildTarget)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679711278"><span class="annot"><span class="annottext">BuildTarget
</span><a href="#local-6989586621679711278"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">QualLevel -&gt; BuildTarget -&gt; PackageId -&gt; UserBuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#renderBuildTarget"><span class="hs-identifier hs-var">renderBuildTarget</span></a></span><span> </span><span class="annot"><span class="annottext">QualLevel
</span><a href="#local-6989586621679711289"><span class="hs-identifier hs-var">ql</span></a></span><span> </span><span class="annot"><span class="annottext">BuildTarget
</span><a href="#local-6989586621679711278"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679711302"><span class="hs-identifier hs-var">pkgid</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">BuildTarget
</span><a href="#local-6989586621679711278"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-362"></span><span>
</span><span id="line-363"></span><span class="hs-keyword">data</span><span> </span><span id="QualLevel"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#QualLevel"><span class="hs-identifier hs-var">QualLevel</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="QL1"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#QL1"><span class="hs-identifier hs-var">QL1</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="QL2"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#QL2"><span class="hs-identifier hs-var">QL2</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="QL3"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#QL3"><span class="hs-identifier hs-var">QL3</span></a></span></span><span>
</span><span id="line-364"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679711242"><span id="local-6989586621679711244"><span id="local-6989586621679711248"><span id="local-6989586621679711252"><span id="local-6989586621679711254"><span id="local-6989586621679711263"><span id="local-6989586621679711269"><span id="local-6989586621679711276"><span class="annot"><span class="annottext">Int -&gt; QualLevel
QualLevel -&gt; Int
QualLevel -&gt; [QualLevel]
QualLevel -&gt; QualLevel
QualLevel -&gt; QualLevel -&gt; [QualLevel]
QualLevel -&gt; QualLevel -&gt; QualLevel -&gt; [QualLevel]
(QualLevel -&gt; QualLevel)
-&gt; (QualLevel -&gt; QualLevel)
-&gt; (Int -&gt; QualLevel)
-&gt; (QualLevel -&gt; Int)
-&gt; (QualLevel -&gt; [QualLevel])
-&gt; (QualLevel -&gt; QualLevel -&gt; [QualLevel])
-&gt; (QualLevel -&gt; QualLevel -&gt; [QualLevel])
-&gt; (QualLevel -&gt; QualLevel -&gt; QualLevel -&gt; [QualLevel])
-&gt; Enum QualLevel
forall a.
(a -&gt; a)
-&gt; (a -&gt; a)
-&gt; (Int -&gt; a)
-&gt; (a -&gt; Int)
-&gt; (a -&gt; [a])
-&gt; (a -&gt; a -&gt; [a])
-&gt; (a -&gt; a -&gt; [a])
-&gt; (a -&gt; a -&gt; a -&gt; [a])
-&gt; Enum a
enumFromThenTo :: QualLevel -&gt; QualLevel -&gt; QualLevel -&gt; [QualLevel]
$cenumFromThenTo :: QualLevel -&gt; QualLevel -&gt; QualLevel -&gt; [QualLevel]
enumFromTo :: QualLevel -&gt; QualLevel -&gt; [QualLevel]
$cenumFromTo :: QualLevel -&gt; QualLevel -&gt; [QualLevel]
enumFromThen :: QualLevel -&gt; QualLevel -&gt; [QualLevel]
$cenumFromThen :: QualLevel -&gt; QualLevel -&gt; [QualLevel]
enumFrom :: QualLevel -&gt; [QualLevel]
$cenumFrom :: QualLevel -&gt; [QualLevel]
fromEnum :: QualLevel -&gt; Int
$cfromEnum :: QualLevel -&gt; Int
toEnum :: Int -&gt; QualLevel
$ctoEnum :: Int -&gt; QualLevel
pred :: QualLevel -&gt; QualLevel
$cpred :: QualLevel -&gt; QualLevel
succ :: QualLevel -&gt; QualLevel
$csucc :: QualLevel -&gt; QualLevel
</span><a href="../../base/src/GHC.Enum.html#Enum"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Enum</span></a></span></span></span></span></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711235"><span id="local-6989586621679711237"><span id="local-6989586621679711239"><span class="annot"><span class="annottext">Int -&gt; QualLevel -&gt; ShowS
[QualLevel] -&gt; ShowS
QualLevel -&gt; FilePath
(Int -&gt; QualLevel -&gt; ShowS)
-&gt; (QualLevel -&gt; FilePath)
-&gt; ([QualLevel] -&gt; ShowS)
-&gt; Show QualLevel
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; FilePath) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [QualLevel] -&gt; ShowS
$cshowList :: [QualLevel] -&gt; ShowS
show :: QualLevel -&gt; FilePath
$cshow :: QualLevel -&gt; FilePath
showsPrec :: Int -&gt; QualLevel -&gt; ShowS
$cshowsPrec :: Int -&gt; QualLevel -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-365"></span><span>
</span><span id="line-366"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#renderBuildTarget"><span class="hs-identifier hs-type">renderBuildTarget</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#QualLevel"><span class="hs-identifier hs-type">QualLevel</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageId"><span class="hs-identifier hs-type">PackageId</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier hs-type">UserBuildTarget</span></a></span><span>
</span><span id="line-367"></span><span id="renderBuildTarget"><span class="annot"><span class="annottext">renderBuildTarget :: QualLevel -&gt; BuildTarget -&gt; PackageId -&gt; UserBuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#renderBuildTarget"><span class="hs-identifier hs-var hs-var">renderBuildTarget</span></a></span></span><span> </span><span id="local-6989586621679711234"><span class="annot"><span class="annottext">QualLevel
</span><a href="#local-6989586621679711234"><span class="hs-identifier hs-var">ql</span></a></span></span><span> </span><span id="local-6989586621679711233"><span class="annot"><span class="annottext">BuildTarget
</span><a href="#local-6989586621679711233"><span class="hs-identifier hs-var">target</span></a></span></span><span> </span><span id="local-6989586621679711232"><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679711232"><span class="hs-identifier hs-var">pkgid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-368"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">QualLevel
</span><a href="#local-6989586621679711234"><span class="hs-identifier hs-var">ql</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-369"></span><span>      </span><span class="annot"><span class="annottext">QualLevel
</span><a href="Distribution.Simple.BuildTarget.html#QL1"><span class="hs-identifier hs-var">QL1</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; UserBuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetSingle"><span class="hs-identifier hs-var">UserBuildTargetSingle</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711231"><span class="hs-identifier hs-var">s1</span></a></span><span>        </span><span class="hs-keyword">where</span><span>  </span><span id="local-6989586621679711231"><span class="annot"><span class="annottext">s1 :: FilePath
</span><a href="#local-6989586621679711231"><span class="hs-identifier hs-var hs-var">s1</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildTarget -&gt; FilePath
</span><a href="#local-6989586621679711230"><span class="hs-identifier hs-var">single</span></a></span><span> </span><span class="annot"><span class="annottext">BuildTarget
</span><a href="#local-6989586621679711233"><span class="hs-identifier hs-var">target</span></a></span><span>
</span><span id="line-370"></span><span>      </span><span class="annot"><span class="annottext">QualLevel
</span><a href="Distribution.Simple.BuildTarget.html#QL2"><span class="hs-identifier hs-var">QL2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; UserBuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetDouble"><span class="hs-identifier hs-var">UserBuildTargetDouble</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711229"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711228"><span class="hs-identifier hs-var">s2</span></a></span><span>     </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679711229"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711229"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711228"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711228"><span class="hs-identifier hs-var">s2</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildTarget -&gt; (FilePath, FilePath)
</span><a href="#local-6989586621679711227"><span class="hs-identifier hs-var">double</span></a></span><span> </span><span class="annot"><span class="annottext">BuildTarget
</span><a href="#local-6989586621679711233"><span class="hs-identifier hs-var">target</span></a></span><span>
</span><span id="line-371"></span><span>      </span><span class="annot"><span class="annottext">QualLevel
</span><a href="Distribution.Simple.BuildTarget.html#QL3"><span class="hs-identifier hs-var">QL3</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath -&gt; UserBuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetTriple"><span class="hs-identifier hs-var">UserBuildTargetTriple</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711226"><span class="hs-identifier hs-var">s1</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711225"><span class="hs-identifier hs-var">s2</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711224"><span class="hs-identifier hs-var">s3</span></a></span><span>  </span><span class="hs-keyword">where</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679711226"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711226"><span class="hs-identifier hs-var">s1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711225"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711225"><span class="hs-identifier hs-var">s2</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711224"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711224"><span class="hs-identifier hs-var">s3</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildTarget -&gt; (FilePath, FilePath, FilePath)
</span><a href="#local-6989586621679711223"><span class="hs-identifier hs-var">triple</span></a></span><span> </span><span class="annot"><span class="annottext">BuildTarget
</span><a href="#local-6989586621679711233"><span class="hs-identifier hs-var">target</span></a></span><span>
</span><span id="line-372"></span><span>
</span><span id="line-373"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-374"></span><span>    </span><span id="local-6989586621679711230"><span class="annot"><span class="annottext">single :: BuildTarget -&gt; FilePath
</span><a href="#local-6989586621679711230"><span class="hs-identifier hs-var hs-var">single</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetComponent"><span class="hs-identifier hs-type">BuildTargetComponent</span></a></span><span> </span><span id="local-6989586621679711221"><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711221"><span class="hs-identifier hs-var">cn</span></a></span></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentName -&gt; FilePath
</span><a href="#local-6989586621679711220"><span class="hs-identifier hs-var">dispCName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711221"><span class="hs-identifier hs-var">cn</span></a></span><span>
</span><span id="line-375"></span><span>    </span><span class="annot"><a href="#local-6989586621679711230"><span class="hs-identifier hs-var">single</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetModule"><span class="hs-identifier hs-type">BuildTargetModule</span></a></span><span>    </span><span class="annot"><span class="annottext">ComponentName
</span><span class="hs-identifier">_</span></span><span>  </span><span id="local-6989586621679711219"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679711219"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; FilePath
forall a. Pretty a =&gt; a -&gt; FilePath
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679711219"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-376"></span><span>    </span><span class="annot"><a href="#local-6989586621679711230"><span class="hs-identifier hs-var">single</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetFile"><span class="hs-identifier hs-type">BuildTargetFile</span></a></span><span>      </span><span class="annot"><span class="annottext">ComponentName
</span><span class="hs-identifier">_</span></span><span>  </span><span id="local-6989586621679711217"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711217"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711217"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-377"></span><span>
</span><span id="line-378"></span><span>    </span><span id="local-6989586621679711227"><span class="annot"><span class="annottext">double :: BuildTarget -&gt; (FilePath, FilePath)
</span><a href="#local-6989586621679711227"><span class="hs-identifier hs-var hs-var">double</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetComponent"><span class="hs-identifier hs-type">BuildTargetComponent</span></a></span><span> </span><span id="local-6989586621679711215"><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711215"><span class="hs-identifier hs-var">cn</span></a></span></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName -&gt; FilePath
</span><a href="#local-6989586621679711214"><span class="hs-identifier hs-var">dispKind</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711215"><span class="hs-identifier hs-var">cn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ComponentName -&gt; FilePath
</span><a href="#local-6989586621679711220"><span class="hs-identifier hs-var">dispCName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711215"><span class="hs-identifier hs-var">cn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-379"></span><span>    </span><span class="annot"><a href="#local-6989586621679711227"><span class="hs-identifier hs-var">double</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetModule"><span class="hs-identifier hs-type">BuildTargetModule</span></a></span><span>    </span><span id="local-6989586621679711213"><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711213"><span class="hs-identifier hs-var">cn</span></a></span></span><span> </span><span id="local-6989586621679711212"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679711212"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName -&gt; FilePath
</span><a href="#local-6989586621679711220"><span class="hs-identifier hs-var">dispCName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711213"><span class="hs-identifier hs-var">cn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; FilePath
forall a. Pretty a =&gt; a -&gt; FilePath
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679711212"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-380"></span><span>    </span><span class="annot"><a href="#local-6989586621679711227"><span class="hs-identifier hs-var">double</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetFile"><span class="hs-identifier hs-type">BuildTargetFile</span></a></span><span>      </span><span id="local-6989586621679711211"><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711211"><span class="hs-identifier hs-var">cn</span></a></span></span><span> </span><span id="local-6989586621679711210"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711210"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName -&gt; FilePath
</span><a href="#local-6989586621679711220"><span class="hs-identifier hs-var">dispCName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711211"><span class="hs-identifier hs-var">cn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711210"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-381"></span><span>
</span><span id="line-382"></span><span>    </span><span id="local-6989586621679711223"><span class="annot"><span class="annottext">triple :: BuildTarget -&gt; (FilePath, FilePath, FilePath)
</span><a href="#local-6989586621679711223"><span class="hs-identifier hs-var hs-var">triple</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetComponent"><span class="hs-identifier hs-type">BuildTargetComponent</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; (FilePath, FilePath, FilePath)
forall a. HasCallStack =&gt; FilePath -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;triple BuildTargetComponent&quot;</span></span><span>
</span><span id="line-383"></span><span>    </span><span class="annot"><a href="#local-6989586621679711223"><span class="hs-identifier hs-var">triple</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetModule"><span class="hs-identifier hs-type">BuildTargetModule</span></a></span><span>    </span><span id="local-6989586621679711206"><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711206"><span class="hs-identifier hs-var">cn</span></a></span></span><span> </span><span id="local-6989586621679711205"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679711205"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName -&gt; FilePath
</span><a href="#local-6989586621679711214"><span class="hs-identifier hs-var">dispKind</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711206"><span class="hs-identifier hs-var">cn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ComponentName -&gt; FilePath
</span><a href="#local-6989586621679711220"><span class="hs-identifier hs-var">dispCName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711206"><span class="hs-identifier hs-var">cn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; FilePath
forall a. Pretty a =&gt; a -&gt; FilePath
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679711205"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-384"></span><span>    </span><span class="annot"><a href="#local-6989586621679711223"><span class="hs-identifier hs-var">triple</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetFile"><span class="hs-identifier hs-type">BuildTargetFile</span></a></span><span>      </span><span id="local-6989586621679711204"><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711204"><span class="hs-identifier hs-var">cn</span></a></span></span><span> </span><span id="local-6989586621679711203"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711203"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName -&gt; FilePath
</span><a href="#local-6989586621679711214"><span class="hs-identifier hs-var">dispKind</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711204"><span class="hs-identifier hs-var">cn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ComponentName -&gt; FilePath
</span><a href="#local-6989586621679711220"><span class="hs-identifier hs-var">dispCName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679711204"><span class="hs-identifier hs-var">cn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711203"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-385"></span><span>
</span><span id="line-386"></span><span>    </span><span id="local-6989586621679711220"><span class="annot"><span class="annottext">dispCName :: ComponentName -&gt; FilePath
</span><a href="#local-6989586621679711220"><span class="hs-identifier hs-var hs-var">dispCName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageId -&gt; ComponentName -&gt; FilePath
forall pkg. Package pkg =&gt; pkg -&gt; ComponentName -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#componentStringName"><span class="hs-identifier hs-var">componentStringName</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679711232"><span class="hs-identifier hs-var">pkgid</span></a></span><span>
</span><span id="line-387"></span><span>    </span><span id="local-6989586621679711214"><span class="annot"><span class="annottext">dispKind :: ComponentName -&gt; FilePath
</span><a href="#local-6989586621679711214"><span class="hs-identifier hs-var hs-var">dispKind</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentKind -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#showComponentKindShort"><span class="hs-identifier hs-var">showComponentKindShort</span></a></span><span> </span><span class="annot"><span class="annottext">(ComponentKind -&gt; FilePath)
-&gt; (ComponentName -&gt; ComponentKind) -&gt; ComponentName -&gt; FilePath
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentName -&gt; ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#componentKind"><span class="hs-identifier hs-var">componentKind</span></a></span><span>
</span><span id="line-388"></span><span>
</span><span id="line-389"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#reportBuildTargetProblems"><span class="hs-identifier hs-type">reportBuildTargetProblems</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetProblem"><span class="hs-identifier hs-type">BuildTargetProblem</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-390"></span><span id="reportBuildTargetProblems"><span class="annot"><span class="annottext">reportBuildTargetProblems :: Verbosity -&gt; [BuildTargetProblem] -&gt; IO ()
</span><a href="Distribution.Simple.BuildTarget.html#reportBuildTargetProblems"><span class="hs-identifier hs-var hs-var">reportBuildTargetProblems</span></a></span></span><span> </span><span id="local-6989586621679711197"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679711197"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679711196"><span class="annot"><span class="annottext">[BuildTargetProblem]
</span><a href="#local-6989586621679711196"><span class="hs-identifier hs-var">problems</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-391"></span><span>
</span><span id="line-392"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711195"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679711194"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711193"><span class="hs-identifier hs-var">g</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetExpected"><span class="hs-identifier hs-type">BuildTargetExpected</span></a></span><span> </span><span id="local-6989586621679711195"><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711195"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span id="local-6989586621679711194"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679711194"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span id="local-6989586621679711193"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711193"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[BuildTargetProblem]
</span><a href="#local-6989586621679711196"><span class="hs-identifier hs-var">problems</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-393"></span><span>      </span><span class="hs-special">[</span><span class="hs-special">]</span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-394"></span><span>      </span><span id="local-6989586621679711192"><span class="annot"><span class="annottext">[(UserBuildTarget, [FilePath], FilePath)]
</span><a href="#local-6989586621679711192"><span class="hs-identifier hs-var">targets</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-395"></span><span>        </span><span class="annot"><span class="annottext">Verbosity -&gt; FilePath -&gt; IO ()
forall a. Verbosity -&gt; FilePath -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679711197"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; IO ()) -&gt; FilePath -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; FilePath
</span><a href="../../base/src/Data.OldList.html#unlines"><span class="hs-identifier hs-var">unlines</span></a></span><span>
</span><span id="line-396"></span><span>          </span><span class="hs-special">[</span><span>    </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Unrecognised build target '&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">UserBuildTarget -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#showUserBuildTarget"><span class="hs-identifier hs-var">showUserBuildTarget</span></a></span><span> </span><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711191"><span class="hs-identifier hs-var">target</span></a></span><span>
</span><span id="line-397"></span><span>            </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;'.\n&quot;</span></span><span>
</span><span id="line-398"></span><span>            </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Expected a &quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath] -&gt; FilePath
forall a. [a] -&gt; [[a]] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#intercalate"><span class="hs-identifier hs-var">intercalate</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; or &quot;</span></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679711190"><span class="hs-identifier hs-var">expected</span></a></span><span>
</span><span id="line-399"></span><span>            </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;, rather than '&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711189"><span class="hs-identifier hs-var">got</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;'.&quot;</span></span><span>
</span><span id="line-400"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679711191"><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711191"><span class="hs-identifier hs-var">target</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711190"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679711190"><span class="hs-identifier hs-var">expected</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711189"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711189"><span class="hs-identifier hs-var">got</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(UserBuildTarget, [FilePath], FilePath)]
</span><a href="#local-6989586621679711192"><span class="hs-identifier hs-var">targets</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-401"></span><span>
</span><span id="line-402"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711188"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[(FilePath, FilePath)]
</span><a href="#local-6989586621679711187"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetNoSuch"><span class="hs-identifier hs-type">BuildTargetNoSuch</span></a></span><span> </span><span id="local-6989586621679711188"><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711188"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span id="local-6989586621679711187"><span class="annot"><span class="annottext">[(FilePath, FilePath)]
</span><a href="#local-6989586621679711187"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[BuildTargetProblem]
</span><a href="#local-6989586621679711196"><span class="hs-identifier hs-var">problems</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-403"></span><span>      </span><span class="hs-special">[</span><span class="hs-special">]</span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-404"></span><span>      </span><span id="local-6989586621679711186"><span class="annot"><span class="annottext">[(UserBuildTarget, [(FilePath, FilePath)])]
</span><a href="#local-6989586621679711186"><span class="hs-identifier hs-var">targets</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-405"></span><span>        </span><span class="annot"><span class="annottext">Verbosity -&gt; FilePath -&gt; IO ()
forall a. Verbosity -&gt; FilePath -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679711197"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; IO ()) -&gt; FilePath -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; FilePath
</span><a href="../../base/src/Data.OldList.html#unlines"><span class="hs-identifier hs-var">unlines</span></a></span><span>
</span><span id="line-406"></span><span>          </span><span class="hs-special">[</span><span>    </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Unknown build target '&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">UserBuildTarget -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#showUserBuildTarget"><span class="hs-identifier hs-var">showUserBuildTarget</span></a></span><span> </span><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711185"><span class="hs-identifier hs-var">target</span></a></span><span>
</span><span id="line-407"></span><span>            </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;'.\nThere is no &quot;</span></span><span>
</span><span id="line-408"></span><span>            </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath] -&gt; FilePath
forall a. [a] -&gt; [[a]] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#intercalate"><span class="hs-identifier hs-var">intercalate</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; or &quot;</span></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="#local-6989586621679711184"><span class="hs-identifier hs-var">mungeThing</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711183"><span class="hs-identifier hs-var">thing</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; '&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711182"><span class="hs-identifier hs-var">got</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;'&quot;</span></span><span>
</span><span id="line-409"></span><span>                                  </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679711183"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711183"><span class="hs-identifier hs-var">thing</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711182"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711182"><span class="hs-identifier hs-var">got</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(FilePath, FilePath)]
</span><a href="#local-6989586621679711181"><span class="hs-identifier hs-var">nosuch</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;.&quot;</span></span><span>
</span><span id="line-410"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679711185"><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711185"><span class="hs-identifier hs-var">target</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711181"><span class="annot"><span class="annottext">[(FilePath, FilePath)]
</span><a href="#local-6989586621679711181"><span class="hs-identifier hs-var">nosuch</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(UserBuildTarget, [(FilePath, FilePath)])]
</span><a href="#local-6989586621679711186"><span class="hs-identifier hs-var">targets</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-411"></span><span>        </span><span class="hs-keyword">where</span><span>
</span><span id="line-412"></span><span>          </span><span id="local-6989586621679711184"><span class="annot"><span class="annottext">mungeThing :: ShowS
</span><a href="#local-6989586621679711184"><span class="hs-identifier hs-var hs-var">mungeThing</span></a></span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;file&quot;</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;file target&quot;</span></span><span>
</span><span id="line-413"></span><span>          </span><span class="annot"><a href="#local-6989586621679711184"><span class="hs-identifier hs-var">mungeThing</span></a></span><span> </span><span id="local-6989586621679711180"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711180"><span class="hs-identifier hs-var">thing</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711180"><span class="hs-identifier hs-var">thing</span></a></span><span>
</span><span id="line-414"></span><span>
</span><span id="line-415"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711179"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[(UserBuildTarget, BuildTarget)]
</span><a href="#local-6989586621679711178"><span class="hs-identifier hs-var">ts</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetAmbiguous"><span class="hs-identifier hs-type">BuildTargetAmbiguous</span></a></span><span> </span><span id="local-6989586621679711179"><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711179"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span id="local-6989586621679711178"><span class="annot"><span class="annottext">[(UserBuildTarget, BuildTarget)]
</span><a href="#local-6989586621679711178"><span class="hs-identifier hs-var">ts</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[BuildTargetProblem]
</span><a href="#local-6989586621679711196"><span class="hs-identifier hs-var">problems</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-416"></span><span>      </span><span class="hs-special">[</span><span class="hs-special">]</span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-417"></span><span>      </span><span id="local-6989586621679711177"><span class="annot"><span class="annottext">[(UserBuildTarget, [(UserBuildTarget, BuildTarget)])]
</span><a href="#local-6989586621679711177"><span class="hs-identifier hs-var">targets</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-418"></span><span>        </span><span class="annot"><span class="annottext">Verbosity -&gt; FilePath -&gt; IO ()
forall a. Verbosity -&gt; FilePath -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679711197"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; IO ()) -&gt; FilePath -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; FilePath
</span><a href="../../base/src/Data.OldList.html#unlines"><span class="hs-identifier hs-var">unlines</span></a></span><span>
</span><span id="line-419"></span><span>          </span><span class="hs-special">[</span><span>    </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Ambiguous build target '&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">UserBuildTarget -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#showUserBuildTarget"><span class="hs-identifier hs-var">showUserBuildTarget</span></a></span><span> </span><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711176"><span class="hs-identifier hs-var">target</span></a></span><span>
</span><span id="line-420"></span><span>            </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;'. It could be:\n &quot;</span></span><span>
</span><span id="line-421"></span><span>            </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; FilePath
</span><a href="../../base/src/Data.OldList.html#unlines"><span class="hs-identifier hs-var">unlines</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;   &quot;</span></span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">UserBuildTarget -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#showUserBuildTarget"><span class="hs-identifier hs-var">showUserBuildTarget</span></a></span><span> </span><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711175"><span class="hs-identifier hs-var">ut</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-422"></span><span>                         </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; (&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">BuildTarget -&gt; FilePath
</span><a href="#local-6989586621679711174"><span class="hs-identifier hs-var">showBuildTargetKind</span></a></span><span> </span><span class="annot"><span class="annottext">BuildTarget
</span><a href="#local-6989586621679711173"><span class="hs-identifier hs-var">bt</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;)&quot;</span></span><span>
</span><span id="line-423"></span><span>                       </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679711175"><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711175"><span class="hs-identifier hs-var">ut</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711173"><span class="annot"><span class="annottext">BuildTarget
</span><a href="#local-6989586621679711173"><span class="hs-identifier hs-var">bt</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(UserBuildTarget, BuildTarget)]
</span><a href="#local-6989586621679711172"><span class="hs-identifier hs-var">amb</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-424"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679711176"><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711176"><span class="hs-identifier hs-var">target</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711172"><span class="annot"><span class="annottext">[(UserBuildTarget, BuildTarget)]
</span><a href="#local-6989586621679711172"><span class="hs-identifier hs-var">amb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(UserBuildTarget, [(UserBuildTarget, BuildTarget)])]
</span><a href="#local-6989586621679711177"><span class="hs-identifier hs-var">targets</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-425"></span><span>
</span><span id="line-426"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-427"></span><span>    </span><span id="local-6989586621679711174"><span class="annot"><span class="annottext">showBuildTargetKind :: BuildTarget -&gt; FilePath
</span><a href="#local-6989586621679711174"><span class="hs-identifier hs-var hs-var">showBuildTargetKind</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetComponent"><span class="hs-identifier hs-type">BuildTargetComponent</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;component&quot;</span></span><span>
</span><span id="line-428"></span><span>    </span><span class="annot"><a href="#local-6989586621679711174"><span class="hs-identifier hs-var">showBuildTargetKind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetModule"><span class="hs-identifier hs-type">BuildTargetModule</span></a></span><span>    </span><span class="annot"><span class="annottext">ComponentName
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;module&quot;</span></span><span>
</span><span id="line-429"></span><span>    </span><span class="annot"><a href="#local-6989586621679711174"><span class="hs-identifier hs-var">showBuildTargetKind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetFile"><span class="hs-identifier hs-type">BuildTargetFile</span></a></span><span>      </span><span class="annot"><span class="annottext">ComponentName
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;file&quot;</span></span><span>
</span><span id="line-430"></span><span>
</span><span id="line-431"></span><span>
</span><span id="line-432"></span><span class="hs-comment">----------------------------------</span><span>
</span><span id="line-433"></span><span class="hs-comment">-- Top level BuildTarget matcher</span><span>
</span><span id="line-434"></span><span class="hs-comment">--</span><span>
</span><span id="line-435"></span><span>
</span><span id="line-436"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchBuildTarget"><span class="hs-identifier hs-type">matchBuildTarget</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span>
</span><span id="line-437"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTarget"><span class="hs-identifier hs-type">UserBuildTarget</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span>
</span><span id="line-438"></span><span id="matchBuildTarget"><span class="annot"><span class="annottext">matchBuildTarget :: PackageDescription -&gt; UserBuildTarget -&gt; Bool -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchBuildTarget"><span class="hs-identifier hs-var hs-var">matchBuildTarget</span></a></span></span><span> </span><span id="local-6989586621679711171"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679711171"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679711170"><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711170"><span class="hs-identifier hs-var">utarget</span></a></span></span><span> </span><span id="local-6989586621679711169"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679711169"><span class="hs-identifier hs-var">fexists</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-439"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">UserBuildTarget
</span><a href="#local-6989586621679711170"><span class="hs-identifier hs-var">utarget</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-440"></span><span>      </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetSingle"><span class="hs-identifier hs-type">UserBuildTargetSingle</span></a></span><span> </span><span id="local-6989586621679711168"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711168"><span class="hs-identifier hs-var">str1</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-441"></span><span>        </span><span class="annot"><span class="annottext">[ComponentInfo] -&gt; FilePath -&gt; Bool -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchBuildTarget1"><span class="hs-identifier hs-var">matchBuildTarget1</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679711166"><span class="hs-identifier hs-var">cinfo</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711168"><span class="hs-identifier hs-var">str1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679711169"><span class="hs-identifier hs-var">fexists</span></a></span><span>
</span><span id="line-442"></span><span>
</span><span id="line-443"></span><span>      </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetDouble"><span class="hs-identifier hs-type">UserBuildTargetDouble</span></a></span><span> </span><span id="local-6989586621679711165"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711165"><span class="hs-identifier hs-var">str1</span></a></span></span><span> </span><span id="local-6989586621679711164"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711164"><span class="hs-identifier hs-var">str2</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-444"></span><span>        </span><span class="annot"><span class="annottext">[ComponentInfo]
-&gt; FilePath -&gt; FilePath -&gt; Bool -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchBuildTarget2"><span class="hs-identifier hs-var">matchBuildTarget2</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679711166"><span class="hs-identifier hs-var">cinfo</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711165"><span class="hs-identifier hs-var">str1</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711164"><span class="hs-identifier hs-var">str2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679711169"><span class="hs-identifier hs-var">fexists</span></a></span><span>
</span><span id="line-445"></span><span>
</span><span id="line-446"></span><span>      </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#UserBuildTargetTriple"><span class="hs-identifier hs-type">UserBuildTargetTriple</span></a></span><span> </span><span id="local-6989586621679711162"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711162"><span class="hs-identifier hs-var">str1</span></a></span></span><span> </span><span id="local-6989586621679711161"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711161"><span class="hs-identifier hs-var">str2</span></a></span></span><span> </span><span id="local-6989586621679711160"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711160"><span class="hs-identifier hs-var">str3</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-447"></span><span>        </span><span class="annot"><span class="annottext">[ComponentInfo]
-&gt; FilePath -&gt; FilePath -&gt; FilePath -&gt; Bool -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchBuildTarget3"><span class="hs-identifier hs-var">matchBuildTarget3</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679711166"><span class="hs-identifier hs-var">cinfo</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711162"><span class="hs-identifier hs-var">str1</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711161"><span class="hs-identifier hs-var">str2</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711160"><span class="hs-identifier hs-var">str3</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679711169"><span class="hs-identifier hs-var">fexists</span></a></span><span>
</span><span id="line-448"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-449"></span><span>    </span><span id="local-6989586621679711166"><span class="annot"><span class="annottext">cinfo :: [ComponentInfo]
</span><a href="#local-6989586621679711166"><span class="hs-identifier hs-var hs-var">cinfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; [ComponentInfo]
</span><a href="Distribution.Simple.BuildTarget.html#pkgComponentInfo"><span class="hs-identifier hs-var">pkgComponentInfo</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679711171"><span class="hs-identifier hs-var">pkg</span></a></span><span>
</span><span id="line-450"></span><span>
</span><span id="line-451"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchBuildTarget1"><span class="hs-identifier hs-type">matchBuildTarget1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span>
</span><span id="line-452"></span><span id="matchBuildTarget1"><span class="annot"><span class="annottext">matchBuildTarget1 :: [ComponentInfo] -&gt; FilePath -&gt; Bool -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchBuildTarget1"><span class="hs-identifier hs-var hs-var">matchBuildTarget1</span></a></span></span><span> </span><span id="local-6989586621679711157"><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679711157"><span class="hs-identifier hs-var">cinfo</span></a></span></span><span> </span><span id="local-6989586621679711156"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711156"><span class="hs-identifier hs-var">str1</span></a></span></span><span> </span><span id="local-6989586621679711155"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679711155"><span class="hs-identifier hs-var">fexists</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-453"></span><span>                        </span><span class="annot"><span class="annottext">[ComponentInfo] -&gt; FilePath -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchComponent1"><span class="hs-identifier hs-var">matchComponent1</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679711157"><span class="hs-identifier hs-var">cinfo</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711156"><span class="hs-identifier hs-var">str1</span></a></span><span>
</span><span id="line-454"></span><span>   </span><span class="annot"><span class="annottext">Match BuildTarget -&gt; Match BuildTarget -&gt; Match BuildTarget
forall a. Match a -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchPlusShadowing"><span class="hs-operator hs-var">`matchPlusShadowing`</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInfo] -&gt; FilePath -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchModule1"><span class="hs-identifier hs-var">matchModule1</span></a></span><span>    </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679711157"><span class="hs-identifier hs-var">cinfo</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711156"><span class="hs-identifier hs-var">str1</span></a></span><span>
</span><span id="line-455"></span><span>   </span><span class="annot"><span class="annottext">Match BuildTarget -&gt; Match BuildTarget -&gt; Match BuildTarget
forall a. Match a -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchPlusShadowing"><span class="hs-operator hs-var">`matchPlusShadowing`</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInfo] -&gt; FilePath -&gt; Bool -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchFile1"><span class="hs-identifier hs-var">matchFile1</span></a></span><span>      </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679711157"><span class="hs-identifier hs-var">cinfo</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711156"><span class="hs-identifier hs-var">str1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679711155"><span class="hs-identifier hs-var">fexists</span></a></span><span>
</span><span id="line-456"></span><span>
</span><span id="line-457"></span><span>
</span><span id="line-458"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchBuildTarget2"><span class="hs-identifier hs-type">matchBuildTarget2</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-459"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span>
</span><span id="line-460"></span><span id="matchBuildTarget2"><span class="annot"><span class="annottext">matchBuildTarget2 :: [ComponentInfo]
-&gt; FilePath -&gt; FilePath -&gt; Bool -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchBuildTarget2"><span class="hs-identifier hs-var hs-var">matchBuildTarget2</span></a></span></span><span> </span><span id="local-6989586621679711150"><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679711150"><span class="hs-identifier hs-var">cinfo</span></a></span></span><span> </span><span id="local-6989586621679711149"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711149"><span class="hs-identifier hs-var">str1</span></a></span></span><span> </span><span id="local-6989586621679711148"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711148"><span class="hs-identifier hs-var">str2</span></a></span></span><span> </span><span id="local-6989586621679711147"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679711147"><span class="hs-identifier hs-var">fexists</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-461"></span><span>                        </span><span class="annot"><span class="annottext">[ComponentInfo] -&gt; FilePath -&gt; FilePath -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchComponent2"><span class="hs-identifier hs-var">matchComponent2</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679711150"><span class="hs-identifier hs-var">cinfo</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711149"><span class="hs-identifier hs-var">str1</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711148"><span class="hs-identifier hs-var">str2</span></a></span><span>
</span><span id="line-462"></span><span>   </span><span class="annot"><span class="annottext">Match BuildTarget -&gt; Match BuildTarget -&gt; Match BuildTarget
forall a. Match a -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchPlusShadowing"><span class="hs-operator hs-var">`matchPlusShadowing`</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInfo] -&gt; FilePath -&gt; FilePath -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchModule2"><span class="hs-identifier hs-var">matchModule2</span></a></span><span>    </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679711150"><span class="hs-identifier hs-var">cinfo</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711149"><span class="hs-identifier hs-var">str1</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711148"><span class="hs-identifier hs-var">str2</span></a></span><span>
</span><span id="line-463"></span><span>   </span><span class="annot"><span class="annottext">Match BuildTarget -&gt; Match BuildTarget -&gt; Match BuildTarget
forall a. Match a -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchPlusShadowing"><span class="hs-operator hs-var">`matchPlusShadowing`</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInfo]
-&gt; FilePath -&gt; FilePath -&gt; Bool -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchFile2"><span class="hs-identifier hs-var">matchFile2</span></a></span><span>      </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679711150"><span class="hs-identifier hs-var">cinfo</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711149"><span class="hs-identifier hs-var">str1</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711148"><span class="hs-identifier hs-var">str2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679711147"><span class="hs-identifier hs-var">fexists</span></a></span><span>
</span><span id="line-464"></span><span>
</span><span id="line-465"></span><span>
</span><span id="line-466"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchBuildTarget3"><span class="hs-identifier hs-type">matchBuildTarget3</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-467"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span>
</span><span id="line-468"></span><span id="matchBuildTarget3"><span class="annot"><span class="annottext">matchBuildTarget3 :: [ComponentInfo]
-&gt; FilePath -&gt; FilePath -&gt; FilePath -&gt; Bool -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchBuildTarget3"><span class="hs-identifier hs-var hs-var">matchBuildTarget3</span></a></span></span><span> </span><span id="local-6989586621679711143"><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679711143"><span class="hs-identifier hs-var">cinfo</span></a></span></span><span> </span><span id="local-6989586621679711142"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711142"><span class="hs-identifier hs-var">str1</span></a></span></span><span> </span><span id="local-6989586621679711141"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711141"><span class="hs-identifier hs-var">str2</span></a></span></span><span> </span><span id="local-6989586621679711140"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711140"><span class="hs-identifier hs-var">str3</span></a></span></span><span> </span><span id="local-6989586621679711139"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679711139"><span class="hs-identifier hs-var">fexists</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-469"></span><span>                        </span><span class="annot"><span class="annottext">[ComponentInfo]
-&gt; FilePath -&gt; FilePath -&gt; FilePath -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchModule3"><span class="hs-identifier hs-var">matchModule3</span></a></span><span>    </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679711143"><span class="hs-identifier hs-var">cinfo</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711142"><span class="hs-identifier hs-var">str1</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711141"><span class="hs-identifier hs-var">str2</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711140"><span class="hs-identifier hs-var">str3</span></a></span><span>
</span><span id="line-470"></span><span>   </span><span class="annot"><span class="annottext">Match BuildTarget -&gt; Match BuildTarget -&gt; Match BuildTarget
forall a. Match a -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchPlusShadowing"><span class="hs-operator hs-var">`matchPlusShadowing`</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInfo]
-&gt; FilePath -&gt; FilePath -&gt; FilePath -&gt; Bool -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchFile3"><span class="hs-identifier hs-var">matchFile3</span></a></span><span>      </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679711143"><span class="hs-identifier hs-var">cinfo</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711142"><span class="hs-identifier hs-var">str1</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711141"><span class="hs-identifier hs-var">str2</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711140"><span class="hs-identifier hs-var">str3</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679711139"><span class="hs-identifier hs-var">fexists</span></a></span><span>
</span><span id="line-471"></span><span>
</span><span id="line-472"></span><span>
</span><span id="line-473"></span><span class="hs-keyword">data</span><span> </span><span id="ComponentInfo"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-var">ComponentInfo</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="ComponentInfo"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-var">ComponentInfo</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-474"></span><span>       </span><span id="cinfoName"><span class="annot"><span class="annottext">ComponentInfo -&gt; ComponentName
</span><a href="Distribution.Simple.BuildTarget.html#cinfoName"><span class="hs-identifier hs-var hs-var">cinfoName</span></a></span></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentName.html#ComponentName"><span class="hs-identifier hs-type">ComponentName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-475"></span><span>       </span><span id="cinfoStrName"><span class="annot"><span class="annottext">ComponentInfo -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#cinfoStrName"><span class="hs-identifier hs-var hs-var">cinfoStrName</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentStringName"><span class="hs-identifier hs-type">ComponentStringName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-476"></span><span>       </span><span id="cinfoSrcDirs"><span class="annot"><span class="annottext">ComponentInfo -&gt; [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoSrcDirs"><span class="hs-identifier hs-var hs-var">cinfoSrcDirs</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-477"></span><span>       </span><span id="cinfoModules"><span class="annot"><span class="annottext">ComponentInfo -&gt; [ModuleName]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoModules"><span class="hs-identifier hs-var hs-var">cinfoModules</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-478"></span><span>       </span><span id="cinfoHsFiles"><span class="annot"><span class="annottext">ComponentInfo -&gt; [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoHsFiles"><span class="hs-identifier hs-var hs-var">cinfoHsFiles</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>   </span><span class="hs-comment">-- other hs files (like main.hs)</span><span>
</span><span id="line-479"></span><span>       </span><span id="cinfoAsmFiles"><span class="annot"><span class="annottext">ComponentInfo -&gt; [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoAsmFiles"><span class="hs-identifier hs-var hs-var">cinfoAsmFiles</span></a></span></span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-480"></span><span>       </span><span id="cinfoCmmFiles"><span class="annot"><span class="annottext">ComponentInfo -&gt; [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoCmmFiles"><span class="hs-identifier hs-var hs-var">cinfoCmmFiles</span></a></span></span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-481"></span><span>       </span><span id="cinfoCFiles"><span class="annot"><span class="annottext">ComponentInfo -&gt; [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoCFiles"><span class="hs-identifier hs-var hs-var">cinfoCFiles</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-482"></span><span>       </span><span id="cinfoCxxFiles"><span class="annot"><span class="annottext">ComponentInfo -&gt; [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoCxxFiles"><span class="hs-identifier hs-var hs-var">cinfoCxxFiles</span></a></span></span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-483"></span><span>       </span><span id="cinfoJsFiles"><span class="annot"><span class="annottext">ComponentInfo -&gt; [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoJsFiles"><span class="hs-identifier hs-var hs-var">cinfoJsFiles</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-484"></span><span>     </span><span class="hs-special">}</span><span>
</span><span id="line-485"></span><span>
</span><span id="line-486"></span><span class="hs-keyword">type</span><span> </span><span id="ComponentStringName"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentStringName"><span class="hs-identifier hs-var">ComponentStringName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-487"></span><span>
</span><span id="line-488"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#pkgComponentInfo"><span class="hs-identifier hs-type">pkgComponentInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-489"></span><span id="pkgComponentInfo"><span class="annot"><span class="annottext">pkgComponentInfo :: PackageDescription -&gt; [ComponentInfo]
</span><a href="Distribution.Simple.BuildTarget.html#pkgComponentInfo"><span class="hs-identifier hs-var hs-var">pkgComponentInfo</span></a></span></span><span> </span><span id="local-6989586621679711124"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679711124"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-490"></span><span>    </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">ComponentInfo :: ComponentName
-&gt; FilePath
-&gt; [FilePath]
-&gt; [ModuleName]
-&gt; [FilePath]
-&gt; [FilePath]
-&gt; [FilePath]
-&gt; [FilePath]
-&gt; [FilePath]
-&gt; [FilePath]
-&gt; ComponentInfo
</span><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-491"></span><span>        </span><span class="annot"><span class="annottext">cinfoName :: ComponentName
</span><a href="Distribution.Simple.BuildTarget.html#cinfoName"><span class="hs-identifier hs-var">cinfoName</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Component -&gt; ComponentName
</span><a href="Distribution.Types.Component.html#componentName"><span class="hs-identifier hs-var">componentName</span></a></span><span> </span><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679711122"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-492"></span><span>        </span><span class="annot"><span class="annottext">cinfoStrName :: FilePath
</span><a href="Distribution.Simple.BuildTarget.html#cinfoStrName"><span class="hs-identifier hs-var">cinfoStrName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; ComponentName -&gt; FilePath
forall pkg. Package pkg =&gt; pkg -&gt; ComponentName -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#componentStringName"><span class="hs-identifier hs-var">componentStringName</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679711124"><span class="hs-identifier hs-var">pkg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Component -&gt; ComponentName
</span><a href="Distribution.Types.Component.html#componentName"><span class="hs-identifier hs-var">componentName</span></a></span><span> </span><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679711122"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-493"></span><span>        </span><span class="annot"><span class="annottext">cinfoSrcDirs :: [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoSrcDirs"><span class="hs-identifier hs-var">cinfoSrcDirs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [FilePath]
</span><a href="Distribution.Types.BuildInfo.html#hsSourceDirs"><span class="hs-identifier hs-var hs-var">hsSourceDirs</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679711120"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-494"></span><span>        </span><span class="annot"><span class="annottext">cinfoModules :: [ModuleName]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoModules"><span class="hs-identifier hs-var">cinfoModules</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Component -&gt; [ModuleName]
</span><a href="Distribution.Simple.BuildTarget.html#componentModules"><span class="hs-identifier hs-var">componentModules</span></a></span><span> </span><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679711122"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-495"></span><span>        </span><span class="annot"><span class="annottext">cinfoHsFiles :: [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoHsFiles"><span class="hs-identifier hs-var">cinfoHsFiles</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Component -&gt; [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#componentHsFiles"><span class="hs-identifier hs-var">componentHsFiles</span></a></span><span> </span><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679711122"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-496"></span><span>        </span><span class="annot"><span class="annottext">cinfoAsmFiles :: [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoAsmFiles"><span class="hs-identifier hs-var">cinfoAsmFiles</span></a></span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [FilePath]
</span><a href="Distribution.Types.BuildInfo.html#asmSources"><span class="hs-identifier hs-var hs-var">asmSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679711120"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-497"></span><span>        </span><span class="annot"><span class="annottext">cinfoCmmFiles :: [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoCmmFiles"><span class="hs-identifier hs-var">cinfoCmmFiles</span></a></span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [FilePath]
</span><a href="Distribution.Types.BuildInfo.html#cmmSources"><span class="hs-identifier hs-var hs-var">cmmSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679711120"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-498"></span><span>        </span><span class="annot"><span class="annottext">cinfoCFiles :: [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoCFiles"><span class="hs-identifier hs-var">cinfoCFiles</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [FilePath]
</span><a href="Distribution.Types.BuildInfo.html#cSources"><span class="hs-identifier hs-var hs-var">cSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679711120"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-499"></span><span>        </span><span class="annot"><span class="annottext">cinfoCxxFiles :: [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoCxxFiles"><span class="hs-identifier hs-var">cinfoCxxFiles</span></a></span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [FilePath]
</span><a href="Distribution.Types.BuildInfo.html#cxxSources"><span class="hs-identifier hs-var hs-var">cxxSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679711120"><span class="hs-identifier hs-var">bi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-500"></span><span>        </span><span class="annot"><span class="annottext">cinfoJsFiles :: [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoJsFiles"><span class="hs-identifier hs-var">cinfoJsFiles</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [FilePath]
</span><a href="Distribution.Types.BuildInfo.html#jsSources"><span class="hs-identifier hs-var hs-var">jsSources</span></a></span><span> </span><span class="annot"><span class="annottext">BuildInfo
</span><a href="#local-6989586621679711120"><span class="hs-identifier hs-var">bi</span></a></span><span>
</span><span id="line-501"></span><span>      </span><span class="hs-special">}</span><span>
</span><span id="line-502"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679711122"><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679711122"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; [Component]
</span><a href="Distribution.Types.PackageDescription.html#pkgComponents"><span class="hs-identifier hs-var">pkgComponents</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679711124"><span class="hs-identifier hs-var">pkg</span></a></span><span>
</span><span id="line-503"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679711120"><span class="annot"><span class="annottext">bi :: BuildInfo
</span><a href="#local-6989586621679711120"><span class="hs-identifier hs-var hs-var">bi</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Component -&gt; BuildInfo
</span><a href="Distribution.Types.Component.html#componentBuildInfo"><span class="hs-identifier hs-var">componentBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679711122"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-504"></span><span>
</span><span id="line-505"></span><span id="local-6989586621679712042"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentStringName"><span class="hs-identifier hs-type">componentStringName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Package.html#Package"><span class="hs-identifier hs-type">Package</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712042"><span class="hs-identifier hs-type">pkg</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679712042"><span class="hs-identifier hs-type">pkg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentName.html#ComponentName"><span class="hs-identifier hs-type">ComponentName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentStringName"><span class="hs-identifier hs-type">ComponentStringName</span></a></span></span><span>
</span><span id="line-506"></span><span id="componentStringName"><span class="annot"><span class="annottext">componentStringName :: forall pkg. Package pkg =&gt; pkg -&gt; ComponentName -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#componentStringName"><span class="hs-identifier hs-var hs-var">componentStringName</span></a></span></span><span> </span><span id="local-6989586621679711106"><span class="annot"><span class="annottext">pkg
</span><a href="#local-6989586621679711106"><span class="hs-identifier hs-var">pkg</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ComponentName.html#CLibName"><span class="hs-identifier hs-type">CLibName</span></a></span><span> </span><span class="annot"><span class="annottext">LibraryName
</span><a href="Distribution.Types.LibraryName.html#LMainLibName"><span class="hs-identifier hs-var">LMainLibName</span></a></span><span>      </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageName -&gt; FilePath
forall a. Pretty a =&gt; a -&gt; FilePath
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">pkg -&gt; PackageName
forall pkg. Package pkg =&gt; pkg -&gt; PackageName
</span><a href="Distribution.Package.html#packageName"><span class="hs-identifier hs-var">packageName</span></a></span><span> </span><span class="annot"><span class="annottext">pkg
</span><a href="#local-6989586621679711106"><span class="hs-identifier hs-var">pkg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-507"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentStringName"><span class="hs-identifier hs-var">componentStringName</span></a></span><span> </span><span class="annot"><span class="annottext">pkg
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ComponentName.html#CLibName"><span class="hs-identifier hs-type">CLibName</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.LibraryName.html#LSubLibName"><span class="hs-identifier hs-type">LSubLibName</span></a></span><span> </span><span id="local-6989586621679711101"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679711101"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; FilePath
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679711101"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-508"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentStringName"><span class="hs-identifier hs-var">componentStringName</span></a></span><span> </span><span class="annot"><span class="annottext">pkg
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ComponentName.html#CFLibName"><span class="hs-identifier hs-type">CFLibName</span></a></span><span>  </span><span id="local-6989586621679711098"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679711098"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; FilePath
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679711098"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-509"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentStringName"><span class="hs-identifier hs-var">componentStringName</span></a></span><span> </span><span class="annot"><span class="annottext">pkg
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ComponentName.html#CExeName"><span class="hs-identifier hs-type">CExeName</span></a></span><span>   </span><span id="local-6989586621679711096"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679711096"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; FilePath
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679711096"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-510"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentStringName"><span class="hs-identifier hs-var">componentStringName</span></a></span><span> </span><span class="annot"><span class="annottext">pkg
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ComponentName.html#CTestName"><span class="hs-identifier hs-type">CTestName</span></a></span><span>  </span><span id="local-6989586621679711094"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679711094"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; FilePath
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679711094"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-511"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentStringName"><span class="hs-identifier hs-var">componentStringName</span></a></span><span> </span><span class="annot"><span class="annottext">pkg
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ComponentName.html#CBenchName"><span class="hs-identifier hs-type">CBenchName</span></a></span><span> </span><span id="local-6989586621679711092"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679711092"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; FilePath
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679711092"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-512"></span><span>
</span><span id="line-513"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentModules"><span class="hs-identifier hs-type">componentModules</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.Component.html#Component"><span class="hs-identifier hs-type">Component</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-514"></span><span class="hs-comment">-- TODO: Use of 'explicitLibModules' here is a bit wrong:</span><span>
</span><span id="line-515"></span><span class="hs-comment">-- a user could very well ask to build a specific signature</span><span>
</span><span id="line-516"></span><span class="hs-comment">-- that was inherited from other packages.  To fix this</span><span>
</span><span id="line-517"></span><span class="hs-comment">-- we have to plumb 'LocalBuildInfo' through this code.</span><span>
</span><span id="line-518"></span><span class="hs-comment">-- Fortunately, this is only used by 'pkgComponentInfo'</span><span>
</span><span id="line-519"></span><span class="hs-comment">-- Please don't export this function unless you plan on fixing</span><span>
</span><span id="line-520"></span><span class="hs-comment">-- this.</span><span>
</span><span id="line-521"></span><span id="componentModules"><span class="annot"><span class="annottext">componentModules :: Component -&gt; [ModuleName]
</span><a href="Distribution.Simple.BuildTarget.html#componentModules"><span class="hs-identifier hs-var hs-var">componentModules</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Component.html#CLib"><span class="hs-identifier hs-type">CLib</span></a></span><span>   </span><span id="local-6989586621679711090"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679711090"><span class="hs-identifier hs-var">lib</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Library -&gt; [ModuleName]
</span><a href="Distribution.Types.Library.html#explicitLibModules"><span class="hs-identifier hs-var">explicitLibModules</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679711090"><span class="hs-identifier hs-var">lib</span></a></span><span>
</span><span id="line-522"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentModules"><span class="hs-identifier hs-var">componentModules</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Component.html#CFLib"><span class="hs-identifier hs-type">CFLib</span></a></span><span>  </span><span id="local-6989586621679711087"><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679711087"><span class="hs-identifier hs-var">flib</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ForeignLib -&gt; [ModuleName]
</span><a href="Distribution.Types.ForeignLib.html#foreignLibModules"><span class="hs-identifier hs-var">foreignLibModules</span></a></span><span> </span><span class="annot"><span class="annottext">ForeignLib
</span><a href="#local-6989586621679711087"><span class="hs-identifier hs-var">flib</span></a></span><span>
</span><span id="line-523"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentModules"><span class="hs-identifier hs-var">componentModules</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Component.html#CExe"><span class="hs-identifier hs-type">CExe</span></a></span><span>   </span><span id="local-6989586621679711084"><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679711084"><span class="hs-identifier hs-var">exe</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Executable -&gt; [ModuleName]
</span><a href="Distribution.Types.Executable.html#exeModules"><span class="hs-identifier hs-var">exeModules</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679711084"><span class="hs-identifier hs-var">exe</span></a></span><span>
</span><span id="line-524"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentModules"><span class="hs-identifier hs-var">componentModules</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Component.html#CTest"><span class="hs-identifier hs-type">CTest</span></a></span><span>  </span><span id="local-6989586621679711081"><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679711081"><span class="hs-identifier hs-var">test</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TestSuite -&gt; [ModuleName]
</span><a href="Distribution.Types.TestSuite.html#testModules"><span class="hs-identifier hs-var">testModules</span></a></span><span> </span><span class="annot"><span class="annottext">TestSuite
</span><a href="#local-6989586621679711081"><span class="hs-identifier hs-var">test</span></a></span><span>
</span><span id="line-525"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentModules"><span class="hs-identifier hs-var">componentModules</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Component.html#CBench"><span class="hs-identifier hs-type">CBench</span></a></span><span> </span><span id="local-6989586621679711078"><span class="annot"><span class="annottext">Benchmark
</span><a href="#local-6989586621679711078"><span class="hs-identifier hs-var">bench</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Benchmark -&gt; [ModuleName]
</span><a href="Distribution.Types.Benchmark.html#benchmarkModules"><span class="hs-identifier hs-var">benchmarkModules</span></a></span><span> </span><span class="annot"><span class="annottext">Benchmark
</span><a href="#local-6989586621679711078"><span class="hs-identifier hs-var">bench</span></a></span><span>
</span><span id="line-526"></span><span>
</span><span id="line-527"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentHsFiles"><span class="hs-identifier hs-type">componentHsFiles</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.Component.html#Component"><span class="hs-identifier hs-type">Component</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-528"></span><span id="componentHsFiles"><span class="annot"><span class="annottext">componentHsFiles :: Component -&gt; [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#componentHsFiles"><span class="hs-identifier hs-var hs-var">componentHsFiles</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Component.html#CExe"><span class="hs-identifier hs-type">CExe</span></a></span><span> </span><span id="local-6989586621679711076"><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679711076"><span class="hs-identifier hs-var">exe</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Executable -&gt; FilePath
</span><a href="Distribution.Types.Executable.html#modulePath"><span class="hs-identifier hs-var hs-var">modulePath</span></a></span><span> </span><span class="annot"><span class="annottext">Executable
</span><a href="#local-6989586621679711076"><span class="hs-identifier hs-var">exe</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-529"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentHsFiles"><span class="hs-identifier hs-var">componentHsFiles</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Component.html#CTest"><span class="hs-identifier hs-type">CTest</span></a></span><span>  </span><span class="annot"><a href="Distribution.Types.TestSuite.html#TestSuite"><span class="hs-identifier hs-type">TestSuite</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-530"></span><span>                           </span><span class="annot"><span class="annottext">testInterface :: TestSuite -&gt; TestSuiteInterface
</span><a href="Distribution.Types.TestSuite.html#testInterface"><span class="hs-identifier hs-var">testInterface</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="Distribution.Types.TestSuiteInterface.html#TestSuiteExeV10"><span class="hs-identifier hs-type">TestSuiteExeV10</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679711071"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711071"><span class="hs-identifier hs-var">mainfile</span></a></span></span><span>
</span><span id="line-531"></span><span>                         </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711071"><span class="hs-identifier hs-var">mainfile</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-532"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentHsFiles"><span class="hs-identifier hs-var">componentHsFiles</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Component.html#CBench"><span class="hs-identifier hs-type">CBench</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.Benchmark.html#Benchmark"><span class="hs-identifier hs-type">Benchmark</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-533"></span><span>                           </span><span class="annot"><span class="annottext">benchmarkInterface :: Benchmark -&gt; BenchmarkInterface
</span><a href="Distribution.Types.Benchmark.html#benchmarkInterface"><span class="hs-identifier hs-var">benchmarkInterface</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="Distribution.Types.BenchmarkInterface.html#BenchmarkExeV10"><span class="hs-identifier hs-type">BenchmarkExeV10</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679711067"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711067"><span class="hs-identifier hs-var">mainfile</span></a></span></span><span>
</span><span id="line-534"></span><span>                         </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679711067"><span class="hs-identifier hs-var">mainfile</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-535"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentHsFiles"><span class="hs-identifier hs-var">componentHsFiles</span></a></span><span> </span><span class="annot"><span class="annottext">Component
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-536"></span><span>
</span><span id="line-537"></span><span class="hs-comment">{-
ex_cs :: [ComponentInfo]
ex_cs =
  [ (mkC (CExeName &quot;foo&quot;) [&quot;src1&quot;, &quot;src1/src2&quot;] [&quot;Foo&quot;, &quot;Src2.Bar&quot;, &quot;Bar&quot;])
  , (mkC (CExeName &quot;tst&quot;) [&quot;src1&quot;, &quot;test&quot;]      [&quot;Foo&quot;])
  ]
    where
    mkC n ds ms = ComponentInfo n (componentStringName pkgid n) ds (map mkMn ms)
    mkMn :: String -&gt; ModuleName
    mkMn  = fromJust . simpleParse
    pkgid :: PackageIdentifier
    Just pkgid = simpleParse &quot;thelib&quot;
-}</span><span>
</span><span id="line-550"></span><span>
</span><span id="line-551"></span><span class="hs-comment">------------------------------</span><span>
</span><span id="line-552"></span><span class="hs-comment">-- Matching component kinds</span><span>
</span><span id="line-553"></span><span class="hs-comment">--</span><span>
</span><span id="line-554"></span><span>
</span><span id="line-555"></span><span class="hs-keyword">data</span><span> </span><span id="ComponentKind"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentKind"><span class="hs-identifier hs-var">ComponentKind</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="LibKind"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#LibKind"><span class="hs-identifier hs-var">LibKind</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="FLibKind"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#FLibKind"><span class="hs-identifier hs-var">FLibKind</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="ExeKind"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ExeKind"><span class="hs-identifier hs-var">ExeKind</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="TestKind"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#TestKind"><span class="hs-identifier hs-var">TestKind</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="BenchKind"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BenchKind"><span class="hs-identifier hs-var">BenchKind</span></a></span></span><span>
</span><span id="line-556"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679711058"><span id="local-6989586621679711060"><span class="annot"><span class="annottext">ComponentKind -&gt; ComponentKind -&gt; Bool
(ComponentKind -&gt; ComponentKind -&gt; Bool)
-&gt; (ComponentKind -&gt; ComponentKind -&gt; Bool) -&gt; Eq ComponentKind
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: ComponentKind -&gt; ComponentKind -&gt; Bool
$c/= :: ComponentKind -&gt; ComponentKind -&gt; Bool
== :: ComponentKind -&gt; ComponentKind -&gt; Bool
$c== :: ComponentKind -&gt; ComponentKind -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711039"><span id="local-6989586621679711041"><span id="local-6989586621679711044"><span id="local-6989586621679711047"><span id="local-6989586621679711050"><span id="local-6989586621679711052"><span id="local-6989586621679711054"><span class="annot"><span class="annottext">Eq ComponentKind
Eq ComponentKind
-&gt; (ComponentKind -&gt; ComponentKind -&gt; Ordering)
-&gt; (ComponentKind -&gt; ComponentKind -&gt; Bool)
-&gt; (ComponentKind -&gt; ComponentKind -&gt; Bool)
-&gt; (ComponentKind -&gt; ComponentKind -&gt; Bool)
-&gt; (ComponentKind -&gt; ComponentKind -&gt; Bool)
-&gt; (ComponentKind -&gt; ComponentKind -&gt; ComponentKind)
-&gt; (ComponentKind -&gt; ComponentKind -&gt; ComponentKind)
-&gt; Ord ComponentKind
ComponentKind -&gt; ComponentKind -&gt; Bool
ComponentKind -&gt; ComponentKind -&gt; Ordering
ComponentKind -&gt; ComponentKind -&gt; ComponentKind
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
min :: ComponentKind -&gt; ComponentKind -&gt; ComponentKind
$cmin :: ComponentKind -&gt; ComponentKind -&gt; ComponentKind
max :: ComponentKind -&gt; ComponentKind -&gt; ComponentKind
$cmax :: ComponentKind -&gt; ComponentKind -&gt; ComponentKind
&gt;= :: ComponentKind -&gt; ComponentKind -&gt; Bool
$c&gt;= :: ComponentKind -&gt; ComponentKind -&gt; Bool
&gt; :: ComponentKind -&gt; ComponentKind -&gt; Bool
$c&gt; :: ComponentKind -&gt; ComponentKind -&gt; Bool
&lt;= :: ComponentKind -&gt; ComponentKind -&gt; Bool
$c&lt;= :: ComponentKind -&gt; ComponentKind -&gt; Bool
&lt; :: ComponentKind -&gt; ComponentKind -&gt; Bool
$c&lt; :: ComponentKind -&gt; ComponentKind -&gt; Bool
compare :: ComponentKind -&gt; ComponentKind -&gt; Ordering
$ccompare :: ComponentKind -&gt; ComponentKind -&gt; Ordering
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></span></span></span></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711033"><span id="local-6989586621679711035"><span id="local-6989586621679711037"><span class="annot"><span class="annottext">Int -&gt; ComponentKind -&gt; ShowS
[ComponentKind] -&gt; ShowS
ComponentKind -&gt; FilePath
(Int -&gt; ComponentKind -&gt; ShowS)
-&gt; (ComponentKind -&gt; FilePath)
-&gt; ([ComponentKind] -&gt; ShowS)
-&gt; Show ComponentKind
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; FilePath) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [ComponentKind] -&gt; ShowS
$cshowList :: [ComponentKind] -&gt; ShowS
show :: ComponentKind -&gt; FilePath
$cshow :: ComponentKind -&gt; FilePath
showsPrec :: Int -&gt; ComponentKind -&gt; ShowS
$cshowsPrec :: Int -&gt; ComponentKind -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679711000"><span id="local-6989586621679711002"><span id="local-6989586621679711006"><span id="local-6989586621679711009"><span id="local-6989586621679711011"><span id="local-6989586621679711019"><span id="local-6989586621679711025"><span id="local-6989586621679711031"><span class="annot"><span class="annottext">Int -&gt; ComponentKind
ComponentKind -&gt; Int
ComponentKind -&gt; [ComponentKind]
ComponentKind -&gt; ComponentKind
ComponentKind -&gt; ComponentKind -&gt; [ComponentKind]
ComponentKind -&gt; ComponentKind -&gt; ComponentKind -&gt; [ComponentKind]
(ComponentKind -&gt; ComponentKind)
-&gt; (ComponentKind -&gt; ComponentKind)
-&gt; (Int -&gt; ComponentKind)
-&gt; (ComponentKind -&gt; Int)
-&gt; (ComponentKind -&gt; [ComponentKind])
-&gt; (ComponentKind -&gt; ComponentKind -&gt; [ComponentKind])
-&gt; (ComponentKind -&gt; ComponentKind -&gt; [ComponentKind])
-&gt; (ComponentKind
    -&gt; ComponentKind -&gt; ComponentKind -&gt; [ComponentKind])
-&gt; Enum ComponentKind
forall a.
(a -&gt; a)
-&gt; (a -&gt; a)
-&gt; (Int -&gt; a)
-&gt; (a -&gt; Int)
-&gt; (a -&gt; [a])
-&gt; (a -&gt; a -&gt; [a])
-&gt; (a -&gt; a -&gt; [a])
-&gt; (a -&gt; a -&gt; a -&gt; [a])
-&gt; Enum a
enumFromThenTo :: ComponentKind -&gt; ComponentKind -&gt; ComponentKind -&gt; [ComponentKind]
$cenumFromThenTo :: ComponentKind -&gt; ComponentKind -&gt; ComponentKind -&gt; [ComponentKind]
enumFromTo :: ComponentKind -&gt; ComponentKind -&gt; [ComponentKind]
$cenumFromTo :: ComponentKind -&gt; ComponentKind -&gt; [ComponentKind]
enumFromThen :: ComponentKind -&gt; ComponentKind -&gt; [ComponentKind]
$cenumFromThen :: ComponentKind -&gt; ComponentKind -&gt; [ComponentKind]
enumFrom :: ComponentKind -&gt; [ComponentKind]
$cenumFrom :: ComponentKind -&gt; [ComponentKind]
fromEnum :: ComponentKind -&gt; Int
$cfromEnum :: ComponentKind -&gt; Int
toEnum :: Int -&gt; ComponentKind
$ctoEnum :: Int -&gt; ComponentKind
pred :: ComponentKind -&gt; ComponentKind
$cpred :: ComponentKind -&gt; ComponentKind
succ :: ComponentKind -&gt; ComponentKind
$csucc :: ComponentKind -&gt; ComponentKind
</span><a href="../../base/src/GHC.Enum.html#Enum"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Enum</span></a></span></span></span></span></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679710996"><span id="local-6989586621679710998"><span class="annot"><span class="annottext">ComponentKind
ComponentKind -&gt; ComponentKind -&gt; Bounded ComponentKind
forall a. a -&gt; a -&gt; Bounded a
maxBound :: ComponentKind
$cmaxBound :: ComponentKind
minBound :: ComponentKind
$cminBound :: ComponentKind
</span><a href="../../base/src/GHC.Enum.html#Bounded"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Bounded</span></a></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-557"></span><span>
</span><span id="line-558"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentKind"><span class="hs-identifier hs-type">componentKind</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentName.html#ComponentName"><span class="hs-identifier hs-type">ComponentName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentKind"><span class="hs-identifier hs-type">ComponentKind</span></a></span><span>
</span><span id="line-559"></span><span id="componentKind"><span class="annot"><span class="annottext">componentKind :: ComponentName -&gt; ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#componentKind"><span class="hs-identifier hs-var hs-var">componentKind</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ComponentName.html#CLibName"><span class="hs-identifier hs-type">CLibName</span></a></span><span>   </span><span class="annot"><span class="annottext">LibraryName
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#LibKind"><span class="hs-identifier hs-var">LibKind</span></a></span><span>
</span><span id="line-560"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentKind"><span class="hs-identifier hs-var">componentKind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ComponentName.html#CFLibName"><span class="hs-identifier hs-type">CFLibName</span></a></span><span>  </span><span class="annot"><span class="annottext">UnqualComponentName
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#FLibKind"><span class="hs-identifier hs-var">FLibKind</span></a></span><span>
</span><span id="line-561"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentKind"><span class="hs-identifier hs-var">componentKind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ComponentName.html#CExeName"><span class="hs-identifier hs-type">CExeName</span></a></span><span>   </span><span class="annot"><span class="annottext">UnqualComponentName
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#ExeKind"><span class="hs-identifier hs-var">ExeKind</span></a></span><span>
</span><span id="line-562"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentKind"><span class="hs-identifier hs-var">componentKind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ComponentName.html#CTestName"><span class="hs-identifier hs-type">CTestName</span></a></span><span>  </span><span class="annot"><span class="annottext">UnqualComponentName
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#TestKind"><span class="hs-identifier hs-var">TestKind</span></a></span><span>
</span><span id="line-563"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#componentKind"><span class="hs-identifier hs-var">componentKind</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ComponentName.html#CBenchName"><span class="hs-identifier hs-type">CBenchName</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#BenchKind"><span class="hs-identifier hs-var">BenchKind</span></a></span><span>
</span><span id="line-564"></span><span>
</span><span id="line-565"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#cinfoKind"><span class="hs-identifier hs-type">cinfoKind</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentKind"><span class="hs-identifier hs-type">ComponentKind</span></a></span><span>
</span><span id="line-566"></span><span id="cinfoKind"><span class="annot"><span class="annottext">cinfoKind :: ComponentInfo -&gt; ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#cinfoKind"><span class="hs-identifier hs-var hs-var">cinfoKind</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentName -&gt; ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#componentKind"><span class="hs-identifier hs-var">componentKind</span></a></span><span> </span><span class="annot"><span class="annottext">(ComponentName -&gt; ComponentKind)
-&gt; (ComponentInfo -&gt; ComponentName)
-&gt; ComponentInfo
-&gt; ComponentKind
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo -&gt; ComponentName
</span><a href="Distribution.Simple.BuildTarget.html#cinfoName"><span class="hs-identifier hs-var hs-var">cinfoName</span></a></span><span>
</span><span id="line-567"></span><span>
</span><span id="line-568"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchComponentKind"><span class="hs-identifier hs-type">matchComponentKind</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentKind"><span class="hs-identifier hs-type">ComponentKind</span></a></span><span>
</span><span id="line-569"></span><span id="matchComponentKind"><span class="annot"><span class="annottext">matchComponentKind :: FilePath -&gt; Match ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#matchComponentKind"><span class="hs-identifier hs-var hs-var">matchComponentKind</span></a></span></span><span> </span><span id="local-6989586621679710991"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710991"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-570"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710991"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;lib&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;library&quot;</span></span><span class="hs-special">]</span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentKind -&gt; Match ComponentKind
forall {b}. b -&gt; Match b
</span><a href="#local-6989586621679710989"><span class="hs-identifier hs-var">return'</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#LibKind"><span class="hs-identifier hs-var">LibKind</span></a></span><span>
</span><span id="line-571"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710991"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;flib&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;foreign-lib&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;foreign-library&quot;</span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentKind -&gt; Match ComponentKind
forall {b}. b -&gt; Match b
</span><a href="#local-6989586621679710989"><span class="hs-identifier hs-var">return'</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#FLibKind"><span class="hs-identifier hs-var">FLibKind</span></a></span><span>
</span><span id="line-572"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710991"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;exe&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;executable&quot;</span></span><span class="hs-special">]</span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentKind -&gt; Match ComponentKind
forall {b}. b -&gt; Match b
</span><a href="#local-6989586621679710989"><span class="hs-identifier hs-var">return'</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#ExeKind"><span class="hs-identifier hs-var">ExeKind</span></a></span><span>
</span><span id="line-573"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710991"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;tst&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;test&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;test-suite&quot;</span></span><span class="hs-special">]</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentKind -&gt; Match ComponentKind
forall {b}. b -&gt; Match b
</span><a href="#local-6989586621679710989"><span class="hs-identifier hs-var">return'</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#TestKind"><span class="hs-identifier hs-var">TestKind</span></a></span><span>
</span><span id="line-574"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710991"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;bench&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;benchmark&quot;</span></span><span class="hs-special">]</span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentKind -&gt; Match ComponentKind
forall {b}. b -&gt; Match b
</span><a href="#local-6989586621679710989"><span class="hs-identifier hs-var">return'</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#BenchKind"><span class="hs-identifier hs-var">BenchKind</span></a></span><span>
</span><span id="line-575"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; Match ComponentKind
forall a. FilePath -&gt; FilePath -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchErrorExpected"><span class="hs-identifier hs-var">matchErrorExpected</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;component kind&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710991"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-576"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-577"></span><span>    </span><span id="local-6989586621679710989"><span class="annot"><span class="annottext">return' :: b -&gt; Match b
</span><a href="#local-6989586621679710989"><span class="hs-identifier hs-var hs-var">return'</span></a></span></span><span> </span><span id="local-6989586621679710985"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679710985"><span class="hs-identifier hs-var">ck</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match ()
</span><a href="Distribution.Simple.BuildTarget.html#increaseConfidence"><span class="hs-identifier hs-var">increaseConfidence</span></a></span><span> </span><span class="annot"><span class="annottext">Match () -&gt; Match b -&gt; Match b
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; Match b
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679710985"><span class="hs-identifier hs-var">ck</span></a></span><span>
</span><span id="line-578"></span><span>
</span><span id="line-579"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#showComponentKind"><span class="hs-identifier hs-type">showComponentKind</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentKind"><span class="hs-identifier hs-type">ComponentKind</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-580"></span><span id="showComponentKind"><span class="annot"><span class="annottext">showComponentKind :: ComponentKind -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#showComponentKind"><span class="hs-identifier hs-var hs-var">showComponentKind</span></a></span></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#LibKind"><span class="hs-identifier hs-var">LibKind</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;library&quot;</span></span><span>
</span><span id="line-581"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#showComponentKind"><span class="hs-identifier hs-var">showComponentKind</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#FLibKind"><span class="hs-identifier hs-var">FLibKind</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;foreign-library&quot;</span></span><span>
</span><span id="line-582"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#showComponentKind"><span class="hs-identifier hs-var">showComponentKind</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#ExeKind"><span class="hs-identifier hs-var">ExeKind</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;executable&quot;</span></span><span>
</span><span id="line-583"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#showComponentKind"><span class="hs-identifier hs-var">showComponentKind</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#TestKind"><span class="hs-identifier hs-var">TestKind</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;test-suite&quot;</span></span><span>
</span><span id="line-584"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#showComponentKind"><span class="hs-identifier hs-var">showComponentKind</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#BenchKind"><span class="hs-identifier hs-var">BenchKind</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;benchmark&quot;</span></span><span>
</span><span id="line-585"></span><span>
</span><span id="line-586"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#showComponentKindShort"><span class="hs-identifier hs-type">showComponentKindShort</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentKind"><span class="hs-identifier hs-type">ComponentKind</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-587"></span><span id="showComponentKindShort"><span class="annot"><span class="annottext">showComponentKindShort :: ComponentKind -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#showComponentKindShort"><span class="hs-identifier hs-var hs-var">showComponentKindShort</span></a></span></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#LibKind"><span class="hs-identifier hs-var">LibKind</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;lib&quot;</span></span><span>
</span><span id="line-588"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#showComponentKindShort"><span class="hs-identifier hs-var">showComponentKindShort</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#FLibKind"><span class="hs-identifier hs-var">FLibKind</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;flib&quot;</span></span><span>
</span><span id="line-589"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#showComponentKindShort"><span class="hs-identifier hs-var">showComponentKindShort</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#ExeKind"><span class="hs-identifier hs-var">ExeKind</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;exe&quot;</span></span><span>
</span><span id="line-590"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#showComponentKindShort"><span class="hs-identifier hs-var">showComponentKindShort</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#TestKind"><span class="hs-identifier hs-var">TestKind</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;test&quot;</span></span><span>
</span><span id="line-591"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#showComponentKindShort"><span class="hs-identifier hs-var">showComponentKindShort</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#BenchKind"><span class="hs-identifier hs-var">BenchKind</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;bench&quot;</span></span><span>
</span><span id="line-592"></span><span>
</span><span id="line-593"></span><span class="hs-comment">------------------------------</span><span>
</span><span id="line-594"></span><span class="hs-comment">-- Matching component targets</span><span>
</span><span id="line-595"></span><span class="hs-comment">--</span><span>
</span><span id="line-596"></span><span>
</span><span id="line-597"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchComponent1"><span class="hs-identifier hs-type">matchComponent1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span>
</span><span id="line-598"></span><span id="matchComponent1"><span class="annot"><span class="annottext">matchComponent1 :: [ComponentInfo] -&gt; FilePath -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchComponent1"><span class="hs-identifier hs-var hs-var">matchComponent1</span></a></span></span><span> </span><span id="local-6989586621679710982"><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710982"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679710981"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710981"><span class="hs-identifier hs-var">str1</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-599"></span><span>    </span><span class="annot"><span class="annottext">FilePath -&gt; Match ()
</span><a href="Distribution.Simple.BuildTarget.html#guardComponentName"><span class="hs-identifier hs-var">guardComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710981"><span class="hs-identifier hs-var">str1</span></a></span><span>
</span><span id="line-600"></span><span>    </span><span id="local-6989586621679710979"><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710979"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ComponentInfo] -&gt; FilePath -&gt; Match ComponentInfo
</span><a href="Distribution.Simple.BuildTarget.html#matchComponentName"><span class="hs-identifier hs-var">matchComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710982"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710981"><span class="hs-identifier hs-var">str1</span></a></span><span>
</span><span id="line-601"></span><span>    </span><span class="annot"><span class="annottext">BuildTarget -&gt; Match BuildTarget
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName -&gt; BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#BuildTargetComponent"><span class="hs-identifier hs-var">BuildTargetComponent</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentInfo -&gt; ComponentName
</span><a href="Distribution.Simple.BuildTarget.html#cinfoName"><span class="hs-identifier hs-var hs-var">cinfoName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710979"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-602"></span><span>
</span><span id="line-603"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchComponent2"><span class="hs-identifier hs-type">matchComponent2</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span>
</span><span id="line-604"></span><span id="matchComponent2"><span class="annot"><span class="annottext">matchComponent2 :: [ComponentInfo] -&gt; FilePath -&gt; FilePath -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchComponent2"><span class="hs-identifier hs-var hs-var">matchComponent2</span></a></span></span><span> </span><span id="local-6989586621679710977"><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710977"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679710976"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710976"><span class="hs-identifier hs-var">str1</span></a></span></span><span> </span><span id="local-6989586621679710975"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710975"><span class="hs-identifier hs-var">str2</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-605"></span><span>    </span><span id="local-6989586621679710974"><span class="annot"><span class="annottext">ComponentKind
</span><a href="#local-6989586621679710974"><span class="hs-identifier hs-var">ckind</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Match ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#matchComponentKind"><span class="hs-identifier hs-var">matchComponentKind</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710976"><span class="hs-identifier hs-var">str1</span></a></span><span>
</span><span id="line-606"></span><span>    </span><span class="annot"><span class="annottext">FilePath -&gt; Match ()
</span><a href="Distribution.Simple.BuildTarget.html#guardComponentName"><span class="hs-identifier hs-var">guardComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710975"><span class="hs-identifier hs-var">str2</span></a></span><span>
</span><span id="line-607"></span><span>    </span><span id="local-6989586621679710973"><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710973"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ComponentInfo] -&gt; ComponentKind -&gt; FilePath -&gt; Match ComponentInfo
</span><a href="Distribution.Simple.BuildTarget.html#matchComponentKindAndName"><span class="hs-identifier hs-var">matchComponentKindAndName</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710977"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="#local-6989586621679710974"><span class="hs-identifier hs-var">ckind</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710975"><span class="hs-identifier hs-var">str2</span></a></span><span>
</span><span id="line-608"></span><span>    </span><span class="annot"><span class="annottext">BuildTarget -&gt; Match BuildTarget
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName -&gt; BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#BuildTargetComponent"><span class="hs-identifier hs-var">BuildTargetComponent</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentInfo -&gt; ComponentName
</span><a href="Distribution.Simple.BuildTarget.html#cinfoName"><span class="hs-identifier hs-var hs-var">cinfoName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710973"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-609"></span><span>
</span><span id="line-610"></span><span class="hs-comment">-- utils:</span><span>
</span><span id="line-611"></span><span>
</span><span id="line-612"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#guardComponentName"><span class="hs-identifier hs-type">guardComponentName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-613"></span><span id="guardComponentName"><span class="annot"><span class="annottext">guardComponentName :: FilePath -&gt; Match ()
</span><a href="Distribution.Simple.BuildTarget.html#guardComponentName"><span class="hs-identifier hs-var hs-var">guardComponentName</span></a></span></span><span> </span><span id="local-6989586621679710971"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710971"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-614"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; FilePath -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#all"><span class="hs-identifier hs-var">all</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679710969"><span class="hs-identifier hs-var">validComponentChar</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710971"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-615"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710971"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match ()
</span><a href="Distribution.Simple.BuildTarget.html#increaseConfidence"><span class="hs-identifier hs-var">increaseConfidence</span></a></span><span>
</span><span id="line-616"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; Match ()
forall a. FilePath -&gt; FilePath -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchErrorExpected"><span class="hs-identifier hs-var">matchErrorExpected</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;component name&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710971"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-617"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-618"></span><span>    </span><span id="local-6989586621679710969"><span class="annot"><span class="annottext">validComponentChar :: Char -&gt; Bool
</span><a href="#local-6989586621679710969"><span class="hs-identifier hs-var hs-var">validComponentChar</span></a></span></span><span> </span><span id="local-6989586621679710964"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679710964"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isAlphaNum"><span class="hs-identifier hs-var">isAlphaNum</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679710964"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679710964"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span>
</span><span id="line-619"></span><span>                        </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679710964"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'_'</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679710964"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679710964"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\''</span></span><span>
</span><span id="line-620"></span><span>
</span><span id="line-621"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchComponentName"><span class="hs-identifier hs-type">matchComponentName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span>
</span><span id="line-622"></span><span id="matchComponentName"><span class="annot"><span class="annottext">matchComponentName :: [ComponentInfo] -&gt; FilePath -&gt; Match ComponentInfo
</span><a href="Distribution.Simple.BuildTarget.html#matchComponentName"><span class="hs-identifier hs-var hs-var">matchComponentName</span></a></span></span><span> </span><span id="local-6989586621679710961"><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710961"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span id="local-6989586621679710960"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710960"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-623"></span><span>    </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; Match ComponentInfo -&gt; Match ComponentInfo
forall a. FilePath -&gt; FilePath -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#orNoSuchThing"><span class="hs-identifier hs-var">orNoSuchThing</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;component&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710960"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-624"></span><span>  </span><span class="annot"><span class="annottext">(Match ComponentInfo -&gt; Match ComponentInfo)
-&gt; Match ComponentInfo -&gt; Match ComponentInfo
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Match ComponentInfo -&gt; Match ComponentInfo
forall a. Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#increaseConfidenceFor"><span class="hs-identifier hs-var">increaseConfidenceFor</span></a></span><span>
</span><span id="line-625"></span><span>  </span><span class="annot"><span class="annottext">(Match ComponentInfo -&gt; Match ComponentInfo)
-&gt; Match ComponentInfo -&gt; Match ComponentInfo
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS
-&gt; [(FilePath, ComponentInfo)] -&gt; FilePath -&gt; Match ComponentInfo
forall a a' b.
(Ord a, Ord a') =&gt;
(a -&gt; a') -&gt; [(a, b)] -&gt; a -&gt; Match b
</span><a href="Distribution.Simple.BuildTarget.html#matchInexactly"><span class="hs-identifier hs-var">matchInexactly</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="Distribution.Simple.BuildTarget.html#caseFold"><span class="hs-identifier hs-var">caseFold</span></a></span><span>
</span><span id="line-626"></span><span>      </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentInfo -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#cinfoStrName"><span class="hs-identifier hs-var hs-var">cinfoStrName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710955"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710955"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679710955"><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710955"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710961"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-627"></span><span>      </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710960"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-628"></span><span>
</span><span id="line-629"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchComponentKindAndName"><span class="hs-identifier hs-type">matchComponentKindAndName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentKind"><span class="hs-identifier hs-type">ComponentKind</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-630"></span><span>                          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span>
</span><span id="line-631"></span><span id="matchComponentKindAndName"><span class="annot"><span class="annottext">matchComponentKindAndName :: [ComponentInfo] -&gt; ComponentKind -&gt; FilePath -&gt; Match ComponentInfo
</span><a href="Distribution.Simple.BuildTarget.html#matchComponentKindAndName"><span class="hs-identifier hs-var hs-var">matchComponentKindAndName</span></a></span></span><span> </span><span id="local-6989586621679710954"><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710954"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span id="local-6989586621679710953"><span class="annot"><span class="annottext">ComponentKind
</span><a href="#local-6989586621679710953"><span class="hs-identifier hs-var">ckind</span></a></span></span><span> </span><span id="local-6989586621679710952"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710952"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-632"></span><span>    </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; Match ComponentInfo -&gt; Match ComponentInfo
forall a. FilePath -&gt; FilePath -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#orNoSuchThing"><span class="hs-identifier hs-var">orNoSuchThing</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentKind -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#showComponentKind"><span class="hs-identifier hs-var">showComponentKind</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="#local-6989586621679710953"><span class="hs-identifier hs-var">ckind</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; component&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710952"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-633"></span><span>  </span><span class="annot"><span class="annottext">(Match ComponentInfo -&gt; Match ComponentInfo)
-&gt; Match ComponentInfo -&gt; Match ComponentInfo
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Match ComponentInfo -&gt; Match ComponentInfo
forall a. Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#increaseConfidenceFor"><span class="hs-identifier hs-var">increaseConfidenceFor</span></a></span><span>
</span><span id="line-634"></span><span>  </span><span class="annot"><span class="annottext">(Match ComponentInfo -&gt; Match ComponentInfo)
-&gt; Match ComponentInfo -&gt; Match ComponentInfo
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">((ComponentKind, FilePath) -&gt; (ComponentKind, FilePath))
-&gt; [((ComponentKind, FilePath), ComponentInfo)]
-&gt; (ComponentKind, FilePath)
-&gt; Match ComponentInfo
forall a a' b.
(Ord a, Ord a') =&gt;
(a -&gt; a') -&gt; [(a, b)] -&gt; a -&gt; Match b
</span><a href="Distribution.Simple.BuildTarget.html#matchInexactly"><span class="hs-identifier hs-var">matchInexactly</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679710951"><span class="annot"><span class="annottext">ComponentKind
</span><a href="#local-6989586621679710951"><span class="hs-identifier hs-var">ck</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679710950"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710950"><span class="hs-identifier hs-var">cn</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentKind
</span><a href="#local-6989586621679710951"><span class="hs-identifier hs-var">ck</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="Distribution.Simple.BuildTarget.html#caseFold"><span class="hs-identifier hs-var">caseFold</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710950"><span class="hs-identifier hs-var">cn</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-635"></span><span>      </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentInfo -&gt; ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#cinfoKind"><span class="hs-identifier hs-var">cinfoKind</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710949"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ComponentInfo -&gt; FilePath
</span><a href="Distribution.Simple.BuildTarget.html#cinfoStrName"><span class="hs-identifier hs-var hs-var">cinfoStrName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710949"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710949"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679710949"><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710949"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710954"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-636"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentKind
</span><a href="#local-6989586621679710953"><span class="hs-identifier hs-var">ckind</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710952"><span class="hs-identifier hs-var">str</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-637"></span><span>
</span><span id="line-638"></span><span>
</span><span id="line-639"></span><span class="hs-comment">------------------------------</span><span>
</span><span id="line-640"></span><span class="hs-comment">-- Matching module targets</span><span>
</span><span id="line-641"></span><span class="hs-comment">--</span><span>
</span><span id="line-642"></span><span>
</span><span id="line-643"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchModule1"><span class="hs-identifier hs-type">matchModule1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span>
</span><span id="line-644"></span><span id="matchModule1"><span class="annot"><span class="annottext">matchModule1 :: [ComponentInfo] -&gt; FilePath -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchModule1"><span class="hs-identifier hs-var hs-var">matchModule1</span></a></span></span><span> </span><span id="local-6989586621679710948"><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710948"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679710947"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710947"><span class="hs-identifier hs-var">str1</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-645"></span><span>    </span><span class="annot"><span class="annottext">FilePath -&gt; Match ()
</span><a href="Distribution.Simple.BuildTarget.html#guardModuleName"><span class="hs-identifier hs-var">guardModuleName</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710947"><span class="hs-identifier hs-var">str1</span></a></span><span>
</span><span id="line-646"></span><span>    </span><span class="annot"><span class="annottext">Match BuildTarget -&gt; Match BuildTarget
forall a. Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#nubMatchErrors"><span class="hs-identifier hs-var">nubMatchErrors</span></a></span><span> </span><span class="annot"><span class="annottext">(Match BuildTarget -&gt; Match BuildTarget)
-&gt; Match BuildTarget -&gt; Match BuildTarget
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-647"></span><span>      </span><span id="local-6989586621679710944"><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710944"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ComponentInfo] -&gt; Match ComponentInfo
forall a. [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#tryEach"><span class="hs-identifier hs-var">tryEach</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710948"><span class="hs-identifier hs-var">cs</span></a></span><span>
</span><span id="line-648"></span><span>      </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679710942"><span class="annot"><span class="annottext">ms :: [ModuleName]
</span><a href="#local-6989586621679710942"><span class="hs-identifier hs-var hs-var">ms</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentInfo -&gt; [ModuleName]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoModules"><span class="hs-identifier hs-var hs-var">cinfoModules</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710944"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-649"></span><span>      </span><span id="local-6989586621679710941"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679710941"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; FilePath -&gt; Match ModuleName
</span><a href="Distribution.Simple.BuildTarget.html#matchModuleName"><span class="hs-identifier hs-var">matchModuleName</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679710942"><span class="hs-identifier hs-var">ms</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710947"><span class="hs-identifier hs-var">str1</span></a></span><span>
</span><span id="line-650"></span><span>      </span><span class="annot"><span class="annottext">BuildTarget -&gt; Match BuildTarget
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName -&gt; ModuleName -&gt; BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#BuildTargetModule"><span class="hs-identifier hs-var">BuildTargetModule</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentInfo -&gt; ComponentName
</span><a href="Distribution.Simple.BuildTarget.html#cinfoName"><span class="hs-identifier hs-var hs-var">cinfoName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710944"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679710941"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-651"></span><span>
</span><span id="line-652"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchModule2"><span class="hs-identifier hs-type">matchModule2</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span>
</span><span id="line-653"></span><span id="matchModule2"><span class="annot"><span class="annottext">matchModule2 :: [ComponentInfo] -&gt; FilePath -&gt; FilePath -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchModule2"><span class="hs-identifier hs-var hs-var">matchModule2</span></a></span></span><span> </span><span id="local-6989586621679710939"><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710939"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679710938"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710938"><span class="hs-identifier hs-var">str1</span></a></span></span><span> </span><span id="local-6989586621679710937"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710937"><span class="hs-identifier hs-var">str2</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-654"></span><span>    </span><span class="annot"><span class="annottext">FilePath -&gt; Match ()
</span><a href="Distribution.Simple.BuildTarget.html#guardComponentName"><span class="hs-identifier hs-var">guardComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710938"><span class="hs-identifier hs-var">str1</span></a></span><span>
</span><span id="line-655"></span><span>    </span><span class="annot"><span class="annottext">FilePath -&gt; Match ()
</span><a href="Distribution.Simple.BuildTarget.html#guardModuleName"><span class="hs-identifier hs-var">guardModuleName</span></a></span><span>    </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710937"><span class="hs-identifier hs-var">str2</span></a></span><span>
</span><span id="line-656"></span><span>    </span><span id="local-6989586621679710936"><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710936"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ComponentInfo] -&gt; FilePath -&gt; Match ComponentInfo
</span><a href="Distribution.Simple.BuildTarget.html#matchComponentName"><span class="hs-identifier hs-var">matchComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710939"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710938"><span class="hs-identifier hs-var">str1</span></a></span><span>
</span><span id="line-657"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679710935"><span class="annot"><span class="annottext">ms :: [ModuleName]
</span><a href="#local-6989586621679710935"><span class="hs-identifier hs-var hs-var">ms</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentInfo -&gt; [ModuleName]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoModules"><span class="hs-identifier hs-var hs-var">cinfoModules</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710936"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-658"></span><span>    </span><span id="local-6989586621679710934"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679710934"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; FilePath -&gt; Match ModuleName
</span><a href="Distribution.Simple.BuildTarget.html#matchModuleName"><span class="hs-identifier hs-var">matchModuleName</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679710935"><span class="hs-identifier hs-var">ms</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710937"><span class="hs-identifier hs-var">str2</span></a></span><span>
</span><span id="line-659"></span><span>    </span><span class="annot"><span class="annottext">BuildTarget -&gt; Match BuildTarget
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName -&gt; ModuleName -&gt; BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#BuildTargetModule"><span class="hs-identifier hs-var">BuildTargetModule</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentInfo -&gt; ComponentName
</span><a href="Distribution.Simple.BuildTarget.html#cinfoName"><span class="hs-identifier hs-var hs-var">cinfoName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710936"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679710934"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-660"></span><span>
</span><span id="line-661"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchModule3"><span class="hs-identifier hs-type">matchModule3</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-662"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span>
</span><span id="line-663"></span><span id="matchModule3"><span class="annot"><span class="annottext">matchModule3 :: [ComponentInfo]
-&gt; FilePath -&gt; FilePath -&gt; FilePath -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchModule3"><span class="hs-identifier hs-var hs-var">matchModule3</span></a></span></span><span> </span><span id="local-6989586621679710933"><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710933"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span id="local-6989586621679710932"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710932"><span class="hs-identifier hs-var">str1</span></a></span></span><span> </span><span id="local-6989586621679710931"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710931"><span class="hs-identifier hs-var">str2</span></a></span></span><span> </span><span id="local-6989586621679710930"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710930"><span class="hs-identifier hs-var">str3</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-664"></span><span>    </span><span id="local-6989586621679710929"><span class="annot"><span class="annottext">ComponentKind
</span><a href="#local-6989586621679710929"><span class="hs-identifier hs-var">ckind</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Match ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#matchComponentKind"><span class="hs-identifier hs-var">matchComponentKind</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710932"><span class="hs-identifier hs-var">str1</span></a></span><span>
</span><span id="line-665"></span><span>    </span><span class="annot"><span class="annottext">FilePath -&gt; Match ()
</span><a href="Distribution.Simple.BuildTarget.html#guardComponentName"><span class="hs-identifier hs-var">guardComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710931"><span class="hs-identifier hs-var">str2</span></a></span><span>
</span><span id="line-666"></span><span>    </span><span id="local-6989586621679710928"><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710928"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ComponentInfo] -&gt; ComponentKind -&gt; FilePath -&gt; Match ComponentInfo
</span><a href="Distribution.Simple.BuildTarget.html#matchComponentKindAndName"><span class="hs-identifier hs-var">matchComponentKindAndName</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710933"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="#local-6989586621679710929"><span class="hs-identifier hs-var">ckind</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710931"><span class="hs-identifier hs-var">str2</span></a></span><span>
</span><span id="line-667"></span><span>    </span><span class="annot"><span class="annottext">FilePath -&gt; Match ()
</span><a href="Distribution.Simple.BuildTarget.html#guardModuleName"><span class="hs-identifier hs-var">guardModuleName</span></a></span><span>    </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710930"><span class="hs-identifier hs-var">str3</span></a></span><span>
</span><span id="line-668"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679710927"><span class="annot"><span class="annottext">ms :: [ModuleName]
</span><a href="#local-6989586621679710927"><span class="hs-identifier hs-var hs-var">ms</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentInfo -&gt; [ModuleName]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoModules"><span class="hs-identifier hs-var hs-var">cinfoModules</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710928"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-669"></span><span>    </span><span id="local-6989586621679710926"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679710926"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; FilePath -&gt; Match ModuleName
</span><a href="Distribution.Simple.BuildTarget.html#matchModuleName"><span class="hs-identifier hs-var">matchModuleName</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679710927"><span class="hs-identifier hs-var">ms</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710930"><span class="hs-identifier hs-var">str3</span></a></span><span>
</span><span id="line-670"></span><span>    </span><span class="annot"><span class="annottext">BuildTarget -&gt; Match BuildTarget
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName -&gt; ModuleName -&gt; BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#BuildTargetModule"><span class="hs-identifier hs-var">BuildTargetModule</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentInfo -&gt; ComponentName
</span><a href="Distribution.Simple.BuildTarget.html#cinfoName"><span class="hs-identifier hs-var hs-var">cinfoName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710928"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679710926"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-671"></span><span>
</span><span id="line-672"></span><span class="hs-comment">-- utils:</span><span>
</span><span id="line-673"></span><span>
</span><span id="line-674"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#guardModuleName"><span class="hs-identifier hs-type">guardModuleName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-675"></span><span id="guardModuleName"><span class="annot"><span class="annottext">guardModuleName :: FilePath -&gt; Match ()
</span><a href="Distribution.Simple.BuildTarget.html#guardModuleName"><span class="hs-identifier hs-var hs-var">guardModuleName</span></a></span></span><span> </span><span id="local-6989586621679710925"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710925"><span class="hs-identifier hs-var">s</span></a></span></span><span>
</span><span id="line-676"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; FilePath -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#all"><span class="hs-identifier hs-var">all</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679710924"><span class="hs-identifier hs-var">validModuleChar</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710925"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-677"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710925"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match ()
</span><a href="Distribution.Simple.BuildTarget.html#increaseConfidence"><span class="hs-identifier hs-var">increaseConfidence</span></a></span><span>
</span><span id="line-678"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; Match ()
forall a. FilePath -&gt; FilePath -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchErrorExpected"><span class="hs-identifier hs-var">matchErrorExpected</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;module name&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710925"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-679"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-680"></span><span>    </span><span id="local-6989586621679710924"><span class="annot"><span class="annottext">validModuleChar :: Char -&gt; Bool
</span><a href="#local-6989586621679710924"><span class="hs-identifier hs-var hs-var">validModuleChar</span></a></span></span><span> </span><span id="local-6989586621679710920"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679710920"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isAlphaNum"><span class="hs-identifier hs-var">isAlphaNum</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679710920"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679710920"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679710920"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'_'</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679710920"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\''</span></span><span>
</span><span id="line-681"></span><span>
</span><span id="line-682"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchModuleName"><span class="hs-identifier hs-type">matchModuleName</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span>
</span><span id="line-683"></span><span id="matchModuleName"><span class="annot"><span class="annottext">matchModuleName :: [ModuleName] -&gt; FilePath -&gt; Match ModuleName
</span><a href="Distribution.Simple.BuildTarget.html#matchModuleName"><span class="hs-identifier hs-var hs-var">matchModuleName</span></a></span></span><span> </span><span id="local-6989586621679710919"><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679710919"><span class="hs-identifier hs-var">ms</span></a></span></span><span> </span><span id="local-6989586621679710918"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710918"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-684"></span><span>    </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; Match ModuleName -&gt; Match ModuleName
forall a. FilePath -&gt; FilePath -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#orNoSuchThing"><span class="hs-identifier hs-var">orNoSuchThing</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;module&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710918"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-685"></span><span>  </span><span class="annot"><span class="annottext">(Match ModuleName -&gt; Match ModuleName)
-&gt; Match ModuleName -&gt; Match ModuleName
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Match ModuleName -&gt; Match ModuleName
forall a. Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#increaseConfidenceFor"><span class="hs-identifier hs-var">increaseConfidenceFor</span></a></span><span>
</span><span id="line-686"></span><span>  </span><span class="annot"><span class="annottext">(Match ModuleName -&gt; Match ModuleName)
-&gt; Match ModuleName -&gt; Match ModuleName
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; [(FilePath, ModuleName)] -&gt; FilePath -&gt; Match ModuleName
forall a a' b.
(Ord a, Ord a') =&gt;
(a -&gt; a') -&gt; [(a, b)] -&gt; a -&gt; Match b
</span><a href="Distribution.Simple.BuildTarget.html#matchInexactly"><span class="hs-identifier hs-var">matchInexactly</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="Distribution.Simple.BuildTarget.html#caseFold"><span class="hs-identifier hs-var">caseFold</span></a></span><span>
</span><span id="line-687"></span><span>      </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; FilePath
forall a. Pretty a =&gt; a -&gt; FilePath
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679710917"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679710917"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-688"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679710917"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679710917"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679710919"><span class="hs-identifier hs-var">ms</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-689"></span><span>      </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710918"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-690"></span><span>
</span><span id="line-691"></span><span>
</span><span id="line-692"></span><span class="hs-comment">------------------------------</span><span>
</span><span id="line-693"></span><span class="hs-comment">-- Matching file targets</span><span>
</span><span id="line-694"></span><span class="hs-comment">--</span><span>
</span><span id="line-695"></span><span>
</span><span id="line-696"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchFile1"><span class="hs-identifier hs-type">matchFile1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span>
</span><span id="line-697"></span><span id="matchFile1"><span class="annot"><span class="annottext">matchFile1 :: [ComponentInfo] -&gt; FilePath -&gt; Bool -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchFile1"><span class="hs-identifier hs-var hs-var">matchFile1</span></a></span></span><span> </span><span id="local-6989586621679710916"><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710916"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span id="local-6989586621679710915"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710915"><span class="hs-identifier hs-var">str1</span></a></span></span><span> </span><span id="local-6989586621679710914"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679710914"><span class="hs-identifier hs-var">exists</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-698"></span><span>    </span><span class="annot"><span class="annottext">Match BuildTarget -&gt; Match BuildTarget
forall a. Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#nubMatchErrors"><span class="hs-identifier hs-var">nubMatchErrors</span></a></span><span> </span><span class="annot"><span class="annottext">(Match BuildTarget -&gt; Match BuildTarget)
-&gt; Match BuildTarget -&gt; Match BuildTarget
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-699"></span><span>      </span><span id="local-6989586621679710913"><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710913"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ComponentInfo] -&gt; Match ComponentInfo
forall a. [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#tryEach"><span class="hs-identifier hs-var">tryEach</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710916"><span class="hs-identifier hs-var">cs</span></a></span><span>
</span><span id="line-700"></span><span>      </span><span id="local-6989586621679710912"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710912"><span class="hs-identifier hs-var">filepath</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ComponentInfo -&gt; FilePath -&gt; Bool -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchComponentFile"><span class="hs-identifier hs-var">matchComponentFile</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710913"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710915"><span class="hs-identifier hs-var">str1</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679710914"><span class="hs-identifier hs-var">exists</span></a></span><span>
</span><span id="line-701"></span><span>      </span><span class="annot"><span class="annottext">BuildTarget -&gt; Match BuildTarget
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName -&gt; FilePath -&gt; BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#BuildTargetFile"><span class="hs-identifier hs-var">BuildTargetFile</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentInfo -&gt; ComponentName
</span><a href="Distribution.Simple.BuildTarget.html#cinfoName"><span class="hs-identifier hs-var hs-var">cinfoName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710913"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710912"><span class="hs-identifier hs-var">filepath</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-702"></span><span>
</span><span id="line-703"></span><span>
</span><span id="line-704"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchFile2"><span class="hs-identifier hs-type">matchFile2</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span>
</span><span id="line-705"></span><span id="matchFile2"><span class="annot"><span class="annottext">matchFile2 :: [ComponentInfo]
-&gt; FilePath -&gt; FilePath -&gt; Bool -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchFile2"><span class="hs-identifier hs-var hs-var">matchFile2</span></a></span></span><span> </span><span id="local-6989586621679710910"><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710910"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span id="local-6989586621679710909"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710909"><span class="hs-identifier hs-var">str1</span></a></span></span><span> </span><span id="local-6989586621679710908"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710908"><span class="hs-identifier hs-var">str2</span></a></span></span><span> </span><span id="local-6989586621679710907"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679710907"><span class="hs-identifier hs-var">exists</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-706"></span><span>    </span><span class="annot"><span class="annottext">FilePath -&gt; Match ()
</span><a href="Distribution.Simple.BuildTarget.html#guardComponentName"><span class="hs-identifier hs-var">guardComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710909"><span class="hs-identifier hs-var">str1</span></a></span><span>
</span><span id="line-707"></span><span>    </span><span id="local-6989586621679710906"><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710906"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ComponentInfo] -&gt; FilePath -&gt; Match ComponentInfo
</span><a href="Distribution.Simple.BuildTarget.html#matchComponentName"><span class="hs-identifier hs-var">matchComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710910"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710909"><span class="hs-identifier hs-var">str1</span></a></span><span>
</span><span id="line-708"></span><span>    </span><span id="local-6989586621679710905"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710905"><span class="hs-identifier hs-var">filepath</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ComponentInfo -&gt; FilePath -&gt; Bool -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchComponentFile"><span class="hs-identifier hs-var">matchComponentFile</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710906"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710908"><span class="hs-identifier hs-var">str2</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679710907"><span class="hs-identifier hs-var">exists</span></a></span><span>
</span><span id="line-709"></span><span>    </span><span class="annot"><span class="annottext">BuildTarget -&gt; Match BuildTarget
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName -&gt; FilePath -&gt; BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#BuildTargetFile"><span class="hs-identifier hs-var">BuildTargetFile</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentInfo -&gt; ComponentName
</span><a href="Distribution.Simple.BuildTarget.html#cinfoName"><span class="hs-identifier hs-var hs-var">cinfoName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710906"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710905"><span class="hs-identifier hs-var">filepath</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-710"></span><span>
</span><span id="line-711"></span><span>
</span><span id="line-712"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchFile3"><span class="hs-identifier hs-type">matchFile3</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-713"></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span>
</span><span id="line-714"></span><span id="matchFile3"><span class="annot"><span class="annottext">matchFile3 :: [ComponentInfo]
-&gt; FilePath -&gt; FilePath -&gt; FilePath -&gt; Bool -&gt; Match BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#matchFile3"><span class="hs-identifier hs-var hs-var">matchFile3</span></a></span></span><span> </span><span id="local-6989586621679710904"><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710904"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span id="local-6989586621679710903"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710903"><span class="hs-identifier hs-var">str1</span></a></span></span><span> </span><span id="local-6989586621679710902"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710902"><span class="hs-identifier hs-var">str2</span></a></span></span><span> </span><span id="local-6989586621679710901"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710901"><span class="hs-identifier hs-var">str3</span></a></span></span><span> </span><span id="local-6989586621679710900"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679710900"><span class="hs-identifier hs-var">exists</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-715"></span><span>    </span><span id="local-6989586621679710899"><span class="annot"><span class="annottext">ComponentKind
</span><a href="#local-6989586621679710899"><span class="hs-identifier hs-var">ckind</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Match ComponentKind
</span><a href="Distribution.Simple.BuildTarget.html#matchComponentKind"><span class="hs-identifier hs-var">matchComponentKind</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710903"><span class="hs-identifier hs-var">str1</span></a></span><span>
</span><span id="line-716"></span><span>    </span><span class="annot"><span class="annottext">FilePath -&gt; Match ()
</span><a href="Distribution.Simple.BuildTarget.html#guardComponentName"><span class="hs-identifier hs-var">guardComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710902"><span class="hs-identifier hs-var">str2</span></a></span><span>
</span><span id="line-717"></span><span>    </span><span id="local-6989586621679710898"><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710898"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ComponentInfo] -&gt; ComponentKind -&gt; FilePath -&gt; Match ComponentInfo
</span><a href="Distribution.Simple.BuildTarget.html#matchComponentKindAndName"><span class="hs-identifier hs-var">matchComponentKindAndName</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInfo]
</span><a href="#local-6989586621679710904"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentKind
</span><a href="#local-6989586621679710899"><span class="hs-identifier hs-var">ckind</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710902"><span class="hs-identifier hs-var">str2</span></a></span><span>
</span><span id="line-718"></span><span>    </span><span id="local-6989586621679710897"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710897"><span class="hs-identifier hs-var">filepath</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ComponentInfo -&gt; FilePath -&gt; Bool -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchComponentFile"><span class="hs-identifier hs-var">matchComponentFile</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710898"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710901"><span class="hs-identifier hs-var">str3</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679710900"><span class="hs-identifier hs-var">exists</span></a></span><span>
</span><span id="line-719"></span><span>    </span><span class="annot"><span class="annottext">BuildTarget -&gt; Match BuildTarget
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName -&gt; FilePath -&gt; BuildTarget
</span><a href="Distribution.Simple.BuildTarget.html#BuildTargetFile"><span class="hs-identifier hs-var">BuildTargetFile</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentInfo -&gt; ComponentName
</span><a href="Distribution.Simple.BuildTarget.html#cinfoName"><span class="hs-identifier hs-var hs-var">cinfoName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710898"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710897"><span class="hs-identifier hs-var">filepath</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-720"></span><span>
</span><span id="line-721"></span><span>
</span><span id="line-722"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchComponentFile"><span class="hs-identifier hs-type">matchComponentFile</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ComponentInfo"><span class="hs-identifier hs-type">ComponentInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-723"></span><span id="matchComponentFile"><span class="annot"><span class="annottext">matchComponentFile :: ComponentInfo -&gt; FilePath -&gt; Bool -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchComponentFile"><span class="hs-identifier hs-var hs-var">matchComponentFile</span></a></span></span><span> </span><span id="local-6989586621679710896"><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710896"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679710895"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710895"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span id="local-6989586621679710894"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679710894"><span class="hs-identifier hs-var">fexists</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-724"></span><span>    </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; Match FilePath -&gt; Match FilePath
forall a. FilePath -&gt; FilePath -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#expecting"><span class="hs-identifier hs-var">expecting</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;file&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710895"><span class="hs-identifier hs-var">str</span></a></span><span> </span><span class="annot"><span class="annottext">(Match FilePath -&gt; Match FilePath)
-&gt; Match FilePath -&gt; Match FilePath
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-725"></span><span>      </span><span class="annot"><span class="annottext">Match FilePath -&gt; Match FilePath -&gt; Match FilePath
forall a. Match a -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchPlus"><span class="hs-identifier hs-var">matchPlus</span></a></span><span>
</span><span id="line-726"></span><span>        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; Bool -&gt; Match FilePath
forall a. FilePath -&gt; Bool -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchFileExists"><span class="hs-identifier hs-var">matchFileExists</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710895"><span class="hs-identifier hs-var">str</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679710894"><span class="hs-identifier hs-var">fexists</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-727"></span><span>        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Match FilePath -&gt; Match FilePath -&gt; Match FilePath
forall a. Match a -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchPlusShadowing"><span class="hs-identifier hs-var">matchPlusShadowing</span></a></span><span>
</span><span id="line-728"></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Match FilePath] -&gt; Match FilePath
forall (t :: * -&gt; *) (m :: * -&gt; *) a.
(Foldable t, MonadPlus m) =&gt;
t (m a) -&gt; m a
</span><a href="../../base/src/Data.Foldable.html#msum"><span class="hs-identifier hs-var">msum</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; [ModuleName] -&gt; FilePath -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchModuleFileRooted"><span class="hs-identifier hs-var">matchModuleFileRooted</span></a></span><span>   </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679710889"><span class="hs-identifier hs-var">dirs</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679710888"><span class="hs-identifier hs-var">ms</span></a></span><span>      </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710895"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-729"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; [FilePath] -&gt; FilePath -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchOtherFileRooted"><span class="hs-identifier hs-var">matchOtherFileRooted</span></a></span><span>    </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679710889"><span class="hs-identifier hs-var">dirs</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679710886"><span class="hs-identifier hs-var">hsFiles</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710895"><span class="hs-identifier hs-var">str</span></a></span><span> </span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-730"></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Match FilePath] -&gt; Match FilePath
forall (t :: * -&gt; *) (m :: * -&gt; *) a.
(Foldable t, MonadPlus m) =&gt;
t (m a) -&gt; m a
</span><a href="../../base/src/Data.Foldable.html#msum"><span class="hs-identifier hs-var">msum</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; FilePath -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchModuleFileUnrooted"><span class="hs-identifier hs-var">matchModuleFileUnrooted</span></a></span><span>      </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679710888"><span class="hs-identifier hs-var">ms</span></a></span><span>      </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710895"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-731"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; FilePath -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchOtherFileUnrooted"><span class="hs-identifier hs-var">matchOtherFileUnrooted</span></a></span><span>       </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679710886"><span class="hs-identifier hs-var">hsFiles</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710895"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-732"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; FilePath -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchOtherFileUnrooted"><span class="hs-identifier hs-var">matchOtherFileUnrooted</span></a></span><span>       </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679710883"><span class="hs-identifier hs-var">cFiles</span></a></span><span>  </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710895"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-733"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; FilePath -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchOtherFileUnrooted"><span class="hs-identifier hs-var">matchOtherFileUnrooted</span></a></span><span>       </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679710882"><span class="hs-identifier hs-var">jsFiles</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710895"><span class="hs-identifier hs-var">str</span></a></span><span> </span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-734"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-735"></span><span>    </span><span id="local-6989586621679710889"><span class="annot"><span class="annottext">dirs :: [FilePath]
</span><a href="#local-6989586621679710889"><span class="hs-identifier hs-var hs-var">dirs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentInfo -&gt; [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoSrcDirs"><span class="hs-identifier hs-var hs-var">cinfoSrcDirs</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710896"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-736"></span><span>    </span><span id="local-6989586621679710888"><span class="annot"><span class="annottext">ms :: [ModuleName]
</span><a href="#local-6989586621679710888"><span class="hs-identifier hs-var hs-var">ms</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentInfo -&gt; [ModuleName]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoModules"><span class="hs-identifier hs-var hs-var">cinfoModules</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710896"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-737"></span><span>    </span><span id="local-6989586621679710886"><span class="annot"><span class="annottext">hsFiles :: [FilePath]
</span><a href="#local-6989586621679710886"><span class="hs-identifier hs-var hs-var">hsFiles</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentInfo -&gt; [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoHsFiles"><span class="hs-identifier hs-var hs-var">cinfoHsFiles</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710896"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-738"></span><span>    </span><span id="local-6989586621679710883"><span class="annot"><span class="annottext">cFiles :: [FilePath]
</span><a href="#local-6989586621679710883"><span class="hs-identifier hs-var hs-var">cFiles</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentInfo -&gt; [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoCFiles"><span class="hs-identifier hs-var hs-var">cinfoCFiles</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710896"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-739"></span><span>    </span><span id="local-6989586621679710882"><span class="annot"><span class="annottext">jsFiles :: [FilePath]
</span><a href="#local-6989586621679710882"><span class="hs-identifier hs-var hs-var">jsFiles</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentInfo -&gt; [FilePath]
</span><a href="Distribution.Simple.BuildTarget.html#cinfoJsFiles"><span class="hs-identifier hs-var hs-var">cinfoJsFiles</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInfo
</span><a href="#local-6989586621679710896"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-740"></span><span>
</span><span id="line-741"></span><span>
</span><span id="line-742"></span><span class="hs-comment">-- utils</span><span>
</span><span id="line-743"></span><span>
</span><span id="line-744"></span><span id="local-6989586621679712010"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchFileExists"><span class="hs-identifier hs-type">matchFileExists</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712010"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-745"></span><span id="matchFileExists"><span class="annot"><span class="annottext">matchFileExists :: forall a. FilePath -&gt; Bool -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchFileExists"><span class="hs-identifier hs-var hs-var">matchFileExists</span></a></span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span>     </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a
forall (m :: * -&gt; *) a. MonadPlus m =&gt; m a
</span><a href="../../base/src/GHC.Base.html#mzero"><span class="hs-identifier hs-var">mzero</span></a></span><span>
</span><span id="line-746"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchFileExists"><span class="hs-identifier hs-var">matchFileExists</span></a></span><span> </span><span id="local-6989586621679710878"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710878"><span class="hs-identifier hs-var">fname</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">Match ()
</span><a href="Distribution.Simple.BuildTarget.html#increaseConfidence"><span class="hs-identifier hs-var">increaseConfidence</span></a></span><span>
</span><span id="line-747"></span><span>                                 </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; Match a
forall a. FilePath -&gt; FilePath -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchErrorNoSuch"><span class="hs-identifier hs-var">matchErrorNoSuch</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;file&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710878"><span class="hs-identifier hs-var">fname</span></a></span><span>
</span><span id="line-748"></span><span>
</span><span id="line-749"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchModuleFileUnrooted"><span class="hs-identifier hs-type">matchModuleFileUnrooted</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-750"></span><span id="matchModuleFileUnrooted"><span class="annot"><span class="annottext">matchModuleFileUnrooted :: [ModuleName] -&gt; FilePath -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchModuleFileUnrooted"><span class="hs-identifier hs-var hs-var">matchModuleFileUnrooted</span></a></span></span><span> </span><span id="local-6989586621679710876"><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679710876"><span class="hs-identifier hs-var">ms</span></a></span></span><span> </span><span id="local-6989586621679710875"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710875"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-751"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679710874"><span class="annot"><span class="annottext">filepath :: FilePath
</span><a href="#local-6989586621679710874"><span class="hs-identifier hs-var hs-var">filepath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#normalise"><span class="hs-identifier hs-var">normalise</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710875"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-752"></span><span>    </span><span class="annot"><span class="annottext">ModuleName
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; FilePath -&gt; Match ModuleName
</span><a href="Distribution.Simple.BuildTarget.html#matchModuleFileStem"><span class="hs-identifier hs-var">matchModuleFileStem</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679710876"><span class="hs-identifier hs-var">ms</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710874"><span class="hs-identifier hs-var">filepath</span></a></span><span>
</span><span id="line-753"></span><span>    </span><span class="annot"><span class="annottext">FilePath -&gt; Match FilePath
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710874"><span class="hs-identifier hs-var">filepath</span></a></span><span>
</span><span id="line-754"></span><span>
</span><span id="line-755"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchModuleFileRooted"><span class="hs-identifier hs-type">matchModuleFileRooted</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-756"></span><span id="matchModuleFileRooted"><span class="annot"><span class="annottext">matchModuleFileRooted :: [FilePath] -&gt; [ModuleName] -&gt; FilePath -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchModuleFileRooted"><span class="hs-identifier hs-var hs-var">matchModuleFileRooted</span></a></span></span><span> </span><span id="local-6989586621679710872"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679710872"><span class="hs-identifier hs-var">dirs</span></a></span></span><span> </span><span id="local-6989586621679710871"><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679710871"><span class="hs-identifier hs-var">ms</span></a></span></span><span> </span><span id="local-6989586621679710870"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710870"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match FilePath -&gt; Match FilePath
forall a. Eq a =&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#nubMatches"><span class="hs-identifier hs-var">nubMatches</span></a></span><span> </span><span class="annot"><span class="annottext">(Match FilePath -&gt; Match FilePath)
-&gt; Match FilePath -&gt; Match FilePath
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-757"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679710868"><span class="annot"><span class="annottext">filepath :: FilePath
</span><a href="#local-6989586621679710868"><span class="hs-identifier hs-var hs-var">filepath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#normalise"><span class="hs-identifier hs-var">normalise</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710870"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-758"></span><span>    </span><span id="local-6989586621679710867"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710867"><span class="hs-identifier hs-var">filepath'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; FilePath -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchDirectoryPrefix"><span class="hs-identifier hs-var">matchDirectoryPrefix</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679710872"><span class="hs-identifier hs-var">dirs</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710868"><span class="hs-identifier hs-var">filepath</span></a></span><span>
</span><span id="line-759"></span><span>    </span><span class="annot"><span class="annottext">ModuleName
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; FilePath -&gt; Match ModuleName
</span><a href="Distribution.Simple.BuildTarget.html#matchModuleFileStem"><span class="hs-identifier hs-var">matchModuleFileStem</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679710871"><span class="hs-identifier hs-var">ms</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710867"><span class="hs-identifier hs-var">filepath'</span></a></span><span>
</span><span id="line-760"></span><span>    </span><span class="annot"><span class="annottext">FilePath -&gt; Match FilePath
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710868"><span class="hs-identifier hs-var">filepath</span></a></span><span>
</span><span id="line-761"></span><span>
</span><span id="line-762"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchModuleFileStem"><span class="hs-identifier hs-type">matchModuleFileStem</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span>
</span><span id="line-763"></span><span id="matchModuleFileStem"><span class="annot"><span class="annottext">matchModuleFileStem :: [ModuleName] -&gt; FilePath -&gt; Match ModuleName
</span><a href="Distribution.Simple.BuildTarget.html#matchModuleFileStem"><span class="hs-identifier hs-var hs-var">matchModuleFileStem</span></a></span></span><span> </span><span id="local-6989586621679710865"><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679710865"><span class="hs-identifier hs-var">ms</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-764"></span><span>      </span><span class="annot"><span class="annottext">Match ModuleName -&gt; Match ModuleName
forall a. Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#increaseConfidenceFor"><span class="hs-identifier hs-var">increaseConfidenceFor</span></a></span><span>
</span><span id="line-765"></span><span>    </span><span class="annot"><span class="annottext">(Match ModuleName -&gt; Match ModuleName)
-&gt; (FilePath -&gt; Match ModuleName) -&gt; FilePath -&gt; Match ModuleName
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; [(FilePath, ModuleName)] -&gt; FilePath -&gt; Match ModuleName
forall a a' b.
(Ord a, Ord a') =&gt;
(a -&gt; a') -&gt; [(a, b)] -&gt; a -&gt; Match b
</span><a href="Distribution.Simple.BuildTarget.html#matchInexactly"><span class="hs-identifier hs-var">matchInexactly</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="Distribution.Simple.BuildTarget.html#caseFold"><span class="hs-identifier hs-var">caseFold</span></a></span><span>
</span><span id="line-766"></span><span>        </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; FilePath
</span><a href="Distribution.ModuleName.html#toFilePath"><span class="hs-identifier hs-var">toFilePath</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679710863"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679710863"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679710863"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679710863"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679710865"><span class="hs-identifier hs-var">ms</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-767"></span><span>    </span><span class="annot"><span class="annottext">(FilePath -&gt; Match ModuleName)
-&gt; ShowS -&gt; FilePath -&gt; Match ModuleName
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#dropExtension"><span class="hs-identifier hs-var">dropExtension</span></a></span><span>
</span><span id="line-768"></span><span>
</span><span id="line-769"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchOtherFileRooted"><span class="hs-identifier hs-type">matchOtherFileRooted</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-770"></span><span id="matchOtherFileRooted"><span class="annot"><span class="annottext">matchOtherFileRooted :: [FilePath] -&gt; [FilePath] -&gt; FilePath -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchOtherFileRooted"><span class="hs-identifier hs-var hs-var">matchOtherFileRooted</span></a></span></span><span> </span><span id="local-6989586621679710862"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679710862"><span class="hs-identifier hs-var">dirs</span></a></span></span><span> </span><span id="local-6989586621679710861"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679710861"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span id="local-6989586621679710860"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710860"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-771"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679710859"><span class="annot"><span class="annottext">filepath :: FilePath
</span><a href="#local-6989586621679710859"><span class="hs-identifier hs-var hs-var">filepath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#normalise"><span class="hs-identifier hs-var">normalise</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710860"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-772"></span><span>    </span><span id="local-6989586621679710858"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710858"><span class="hs-identifier hs-var">filepath'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; FilePath -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchDirectoryPrefix"><span class="hs-identifier hs-var">matchDirectoryPrefix</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679710862"><span class="hs-identifier hs-var">dirs</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710859"><span class="hs-identifier hs-var">filepath</span></a></span><span>
</span><span id="line-773"></span><span>    </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; FilePath -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchFile"><span class="hs-identifier hs-var">matchFile</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679710861"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710858"><span class="hs-identifier hs-var">filepath'</span></a></span><span>
</span><span id="line-774"></span><span>    </span><span class="annot"><span class="annottext">FilePath -&gt; Match FilePath
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710859"><span class="hs-identifier hs-var">filepath</span></a></span><span>
</span><span id="line-775"></span><span>
</span><span id="line-776"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchOtherFileUnrooted"><span class="hs-identifier hs-type">matchOtherFileUnrooted</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-777"></span><span id="matchOtherFileUnrooted"><span class="annot"><span class="annottext">matchOtherFileUnrooted :: [FilePath] -&gt; FilePath -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchOtherFileUnrooted"><span class="hs-identifier hs-var hs-var">matchOtherFileUnrooted</span></a></span></span><span> </span><span id="local-6989586621679710856"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679710856"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span id="local-6989586621679710855"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710855"><span class="hs-identifier hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-778"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679710854"><span class="annot"><span class="annottext">filepath :: FilePath
</span><a href="#local-6989586621679710854"><span class="hs-identifier hs-var hs-var">filepath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#normalise"><span class="hs-identifier hs-var">normalise</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710855"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-779"></span><span>    </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; FilePath -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchFile"><span class="hs-identifier hs-var">matchFile</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679710856"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710854"><span class="hs-identifier hs-var">filepath</span></a></span><span>
</span><span id="line-780"></span><span>    </span><span class="annot"><span class="annottext">FilePath -&gt; Match FilePath
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710854"><span class="hs-identifier hs-var">filepath</span></a></span><span>
</span><span id="line-781"></span><span>
</span><span id="line-782"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchFile"><span class="hs-identifier hs-type">matchFile</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-783"></span><span id="matchFile"><span class="annot"><span class="annottext">matchFile :: [FilePath] -&gt; FilePath -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchFile"><span class="hs-identifier hs-var hs-var">matchFile</span></a></span></span><span> </span><span id="local-6989586621679710853"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679710853"><span class="hs-identifier hs-var">fs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match FilePath -&gt; Match FilePath
forall a. Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#increaseConfidenceFor"><span class="hs-identifier hs-var">increaseConfidenceFor</span></a></span><span>
</span><span id="line-784"></span><span>             </span><span class="annot"><span class="annottext">(Match FilePath -&gt; Match FilePath)
-&gt; (FilePath -&gt; Match FilePath) -&gt; FilePath -&gt; Match FilePath
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; [(FilePath, FilePath)] -&gt; FilePath -&gt; Match FilePath
forall a a' b.
(Ord a, Ord a') =&gt;
(a -&gt; a') -&gt; [(a, b)] -&gt; a -&gt; Match b
</span><a href="Distribution.Simple.BuildTarget.html#matchInexactly"><span class="hs-identifier hs-var">matchInexactly</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="Distribution.Simple.BuildTarget.html#caseFold"><span class="hs-identifier hs-var">caseFold</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710852"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710852"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679710852"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710852"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679710853"><span class="hs-identifier hs-var">fs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-785"></span><span>
</span><span id="line-786"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchDirectoryPrefix"><span class="hs-identifier hs-type">matchDirectoryPrefix</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-787"></span><span id="matchDirectoryPrefix"><span class="annot"><span class="annottext">matchDirectoryPrefix :: [FilePath] -&gt; FilePath -&gt; Match FilePath
</span><a href="Distribution.Simple.BuildTarget.html#matchDirectoryPrefix"><span class="hs-identifier hs-var hs-var">matchDirectoryPrefix</span></a></span></span><span> </span><span id="local-6989586621679710851"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679710851"><span class="hs-identifier hs-var">dirs</span></a></span></span><span> </span><span id="local-6989586621679710850"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710850"><span class="hs-identifier hs-var">filepath</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-788"></span><span>    </span><span class="annot"><span class="annottext">[FilePath] -&gt; Match FilePath
forall a. [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#exactMatches"><span class="hs-identifier hs-var">exactMatches</span></a></span><span> </span><span class="annot"><span class="annottext">([FilePath] -&gt; Match FilePath) -&gt; [FilePath] -&gt; Match FilePath
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-789"></span><span>      </span><span class="annot"><span class="annottext">[Maybe FilePath] -&gt; [FilePath]
forall a. [Maybe a] -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#catMaybes"><span class="hs-identifier hs-var">catMaybes</span></a></span><span>
</span><span id="line-790"></span><span>       </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; Maybe FilePath
</span><a href="#local-6989586621679710847"><span class="hs-identifier hs-var">stripDirectory</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#normalise"><span class="hs-identifier hs-var">normalise</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710846"><span class="hs-identifier hs-var">dir</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710850"><span class="hs-identifier hs-var">filepath</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679710846"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710846"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621679710851"><span class="hs-identifier hs-var">dirs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-791"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-792"></span><span>    </span><span class="annot"><a href="#local-6989586621679710847"><span class="hs-identifier hs-type">stripDirectory</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-793"></span><span>    </span><span id="local-6989586621679710847"><span class="annot"><span class="annottext">stripDirectory :: FilePath -&gt; FilePath -&gt; Maybe FilePath
</span><a href="#local-6989586621679710847"><span class="hs-identifier hs-var hs-var">stripDirectory</span></a></span></span><span> </span><span id="local-6989586621679710845"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710845"><span class="hs-identifier hs-var">dir</span></a></span></span><span> </span><span id="local-6989586621679710844"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710844"><span class="hs-identifier hs-var">fp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-794"></span><span>      </span><span class="annot"><span class="annottext">[FilePath] -&gt; FilePath
</span><a href="../../filepath/src/System.FilePath.Windows.html#joinPath"><span class="hs-identifier hs-var">joinPath</span></a></span><span> </span><span class="annot"><span class="annottext">([FilePath] -&gt; FilePath) -&gt; Maybe [FilePath] -&gt; Maybe FilePath
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; [FilePath] -&gt; Maybe [FilePath]
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Maybe [a]
</span><a href="../../base/src/Data.OldList.html#stripPrefix"><span class="hs-identifier hs-var">stripPrefix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath]
</span><a href="../../filepath/src/System.FilePath.Windows.html#splitDirectories"><span class="hs-identifier hs-var">splitDirectories</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710845"><span class="hs-identifier hs-var">dir</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath]
</span><a href="../../filepath/src/System.FilePath.Windows.html#splitDirectories"><span class="hs-identifier hs-var">splitDirectories</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710844"><span class="hs-identifier hs-var">fp</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-795"></span><span>
</span><span id="line-796"></span><span>
</span><span id="line-797"></span><span class="hs-comment">------------------------------</span><span>
</span><span id="line-798"></span><span class="hs-comment">-- Matching monad</span><span>
</span><span id="line-799"></span><span class="hs-comment">--</span><span>
</span><span id="line-800"></span><span>
</span><span id="line-801"></span><span class="hs-comment">-- | A matcher embodies a way to match some input as being some recognised</span><span>
</span><span id="line-802"></span><span class="hs-comment">-- value. In particular it deals with multiple and ambiguous matches.</span><span>
</span><span id="line-803"></span><span class="hs-comment">--</span><span>
</span><span id="line-804"></span><span class="hs-comment">-- There are various matcher primitives ('matchExactly', 'matchInexactly'),</span><span>
</span><span id="line-805"></span><span class="hs-comment">-- ways to combine matchers ('ambiguousWith', 'shadows') and finally we can</span><span>
</span><span id="line-806"></span><span class="hs-comment">-- run a matcher against an input using 'findMatch'.</span><span>
</span><span id="line-807"></span><span class="hs-comment">--</span><span>
</span><span id="line-808"></span><span>
</span><span id="line-809"></span><span class="hs-keyword">data</span><span> </span><span id="Match"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-var">Match</span></a></span></span><span> </span><span id="local-6989586621679711998"><span class="annot"><a href="#local-6989586621679711998"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="NoMatch"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-var">NoMatch</span></a></span></span><span>      </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Confidence"><span class="hs-identifier hs-type">Confidence</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#MatchError"><span class="hs-identifier hs-type">MatchError</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-810"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span id="ExactMatch"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-var">ExactMatch</span></a></span></span><span>   </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Confidence"><span class="hs-identifier hs-type">Confidence</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679711998"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-811"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span id="InexactMatch"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-var">InexactMatch</span></a></span></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Confidence"><span class="hs-identifier hs-type">Confidence</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679711998"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-812"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span id="local-6989586621679710824"><span id="local-6989586621679710826"><span id="local-6989586621679710838"><span class="annot"><span class="annottext">Int -&gt; Match a -&gt; ShowS
[Match a] -&gt; ShowS
Match a -&gt; FilePath
(Int -&gt; Match a -&gt; ShowS)
-&gt; (Match a -&gt; FilePath) -&gt; ([Match a] -&gt; ShowS) -&gt; Show (Match a)
forall a. Show a =&gt; Int -&gt; Match a -&gt; ShowS
forall a. Show a =&gt; [Match a] -&gt; ShowS
forall a. Show a =&gt; Match a -&gt; FilePath
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; FilePath) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [Match a] -&gt; ShowS
$cshowList :: forall a. Show a =&gt; [Match a] -&gt; ShowS
show :: Match a -&gt; FilePath
$cshow :: forall a. Show a =&gt; Match a -&gt; FilePath
showsPrec :: Int -&gt; Match a -&gt; ShowS
$cshowsPrec :: forall a. Show a =&gt; Int -&gt; Match a -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span>
</span><span id="line-813"></span><span>
</span><span id="line-814"></span><span class="hs-keyword">type</span><span> </span><span id="Confidence"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Confidence"><span class="hs-identifier hs-var">Confidence</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-815"></span><span>
</span><span id="line-816"></span><span class="hs-keyword">data</span><span> </span><span id="MatchError"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#MatchError"><span class="hs-identifier hs-var">MatchError</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="MatchErrorExpected"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#MatchErrorExpected"><span class="hs-identifier hs-var">MatchErrorExpected</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-817"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="MatchErrorNoSuch"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#MatchErrorNoSuch"><span class="hs-identifier hs-var">MatchErrorNoSuch</span></a></span></span><span>   </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-818"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679710811"><span id="local-6989586621679710813"><span id="local-6989586621679710822"><span class="annot"><span class="annottext">Int -&gt; MatchError -&gt; ShowS
[MatchError] -&gt; ShowS
MatchError -&gt; FilePath
(Int -&gt; MatchError -&gt; ShowS)
-&gt; (MatchError -&gt; FilePath)
-&gt; ([MatchError] -&gt; ShowS)
-&gt; Show MatchError
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; FilePath) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [MatchError] -&gt; ShowS
$cshowList :: [MatchError] -&gt; ShowS
show :: MatchError -&gt; FilePath
$cshow :: MatchError -&gt; FilePath
showsPrec :: Int -&gt; MatchError -&gt; ShowS
$cshowsPrec :: Int -&gt; MatchError -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679710803"><span id="local-6989586621679710809"><span class="annot"><span class="annottext">MatchError -&gt; MatchError -&gt; Bool
(MatchError -&gt; MatchError -&gt; Bool)
-&gt; (MatchError -&gt; MatchError -&gt; Bool) -&gt; Eq MatchError
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: MatchError -&gt; MatchError -&gt; Bool
$c/= :: MatchError -&gt; MatchError -&gt; Bool
== :: MatchError -&gt; MatchError -&gt; Bool
$c== :: MatchError -&gt; MatchError -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-819"></span><span>
</span><span id="line-820"></span><span>
</span><span id="line-821"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679710795"><span id="local-6989586621679710797"><span class="annot"><a href="../../base/src/GHC.Base.html#Alternative"><span class="hs-identifier hs-type">Alternative</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-822"></span><span>      </span><span id="local-6989586621679710792"><span class="annot"><span class="annottext">empty :: forall a. Match a
</span><a href="../../base/src/GHC.Base.html#empty"><span class="hs-identifier hs-var hs-var hs-var hs-var">empty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a
forall (m :: * -&gt; *) a. MonadPlus m =&gt; m a
</span><a href="../../base/src/GHC.Base.html#mzero"><span class="hs-identifier hs-var">mzero</span></a></span><span>
</span><span id="line-823"></span><span>      </span><span id="local-6989586621679710789"><span class="annot"><span class="annottext">&lt;|&gt; :: forall a. Match a -&gt; Match a -&gt; Match a
</span><a href="#local-6989586621679710789"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;|&gt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a -&gt; Match a -&gt; Match a
forall (m :: * -&gt; *) a. MonadPlus m =&gt; m a -&gt; m a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#mplus"><span class="hs-identifier hs-var">mplus</span></a></span><span>
</span><span id="line-824"></span><span>
</span><span id="line-825"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#MonadPlus"><span class="hs-identifier hs-type">MonadPlus</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-826"></span><span>  </span><span id="local-6989586621679710780"><span class="annot"><span class="annottext">mzero :: forall a. Match a
</span><a href="#local-6989586621679710780"><span class="hs-identifier hs-var hs-var hs-var hs-var">mzero</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a
forall a. Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchZero"><span class="hs-identifier hs-var">matchZero</span></a></span><span>
</span><span id="line-827"></span><span>  </span><span id="local-6989586621679710778"><span class="annot"><span class="annottext">mplus :: forall a. Match a -&gt; Match a -&gt; Match a
</span><a href="#local-6989586621679710778"><span class="hs-identifier hs-var hs-var hs-var hs-var">mplus</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a -&gt; Match a -&gt; Match a
forall a. Match a -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchPlus"><span class="hs-identifier hs-var">matchPlus</span></a></span><span>
</span><span id="line-828"></span><span>
</span><span id="line-829"></span><span id="local-6989586621679710777"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchZero"><span class="hs-identifier hs-type">matchZero</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679710777"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-830"></span><span id="matchZero"><span class="annot"><span class="annottext">matchZero :: forall a. Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchZero"><span class="hs-identifier hs-var hs-var">matchZero</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [MatchError] -&gt; Match a
forall a. Int -&gt; [MatchError] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-var">NoMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-831"></span><span>
</span><span id="line-832"></span><span class="hs-comment">-- | Combine two matchers. Exact matches are used over inexact matches</span><span>
</span><span id="line-833"></span><span class="hs-comment">-- but if we have multiple exact, or inexact then the we collect all the</span><span>
</span><span id="line-834"></span><span class="hs-comment">-- ambiguous matches.</span><span>
</span><span id="line-835"></span><span class="hs-comment">--</span><span>
</span><span id="line-836"></span><span id="local-6989586621679710776"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchPlus"><span class="hs-identifier hs-type">matchPlus</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679710776"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679710776"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679710776"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-837"></span><span id="matchPlus"><span class="annot"><span class="annottext">matchPlus :: forall a. Match a -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchPlus"><span class="hs-identifier hs-var hs-var">matchPlus</span></a></span></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-type">ExactMatch</span></a></span><span>   </span><span id="local-6989586621679710771"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710771"><span class="hs-identifier hs-var">d1</span></a></span></span><span> </span><span id="local-6989586621679710770"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710770"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-type">ExactMatch</span></a></span><span>   </span><span id="local-6989586621679710769"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710769"><span class="hs-identifier hs-var">d2</span></a></span></span><span> </span><span id="local-6989586621679710768"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710768"><span class="hs-identifier hs-var">xs'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-838"></span><span>  </span><span class="annot"><span class="annottext">Int -&gt; [a] -&gt; Match a
forall a. Int -&gt; [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-var">ExactMatch</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><span class="hs-identifier hs-var">max</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710771"><span class="hs-identifier hs-var">d1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710769"><span class="hs-identifier hs-var">d2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710770"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710768"><span class="hs-identifier hs-var">xs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-839"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchPlus"><span class="hs-identifier hs-var">matchPlus</span></a></span><span> </span><span id="local-6989586621679710766"><span class="annot"><span class="annottext">a :: Match a
</span><a href="#local-6989586621679710766"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-type">ExactMatch</span></a></span><span>   </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">)</span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-type">InexactMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710766"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-840"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchPlus"><span class="hs-identifier hs-var">matchPlus</span></a></span><span> </span><span id="local-6989586621679710765"><span class="annot"><span class="annottext">a :: Match a
</span><a href="#local-6989586621679710765"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-type">ExactMatch</span></a></span><span>   </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">)</span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-type">NoMatch</span></a></span><span>      </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">[MatchError]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710765"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-841"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchPlus"><span class="hs-identifier hs-var">matchPlus</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-type">InexactMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">)</span><span> </span><span id="local-6989586621679710764"><span class="annot"><span class="annottext">b :: Match a
</span><a href="#local-6989586621679710764"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-type">ExactMatch</span></a></span><span>   </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710764"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-842"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchPlus"><span class="hs-identifier hs-var">matchPlus</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-type">InexactMatch</span></a></span><span> </span><span id="local-6989586621679710763"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710763"><span class="hs-identifier hs-var">d1</span></a></span></span><span> </span><span id="local-6989586621679710762"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710762"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-type">InexactMatch</span></a></span><span> </span><span id="local-6989586621679710761"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710761"><span class="hs-identifier hs-var">d2</span></a></span></span><span> </span><span id="local-6989586621679710760"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710760"><span class="hs-identifier hs-var">xs'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-843"></span><span>  </span><span class="annot"><span class="annottext">Int -&gt; [a] -&gt; Match a
forall a. Int -&gt; [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-var">InexactMatch</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><span class="hs-identifier hs-var">max</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710763"><span class="hs-identifier hs-var">d1</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710761"><span class="hs-identifier hs-var">d2</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710762"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710760"><span class="hs-identifier hs-var">xs'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-844"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchPlus"><span class="hs-identifier hs-var">matchPlus</span></a></span><span> </span><span id="local-6989586621679710759"><span class="annot"><span class="annottext">a :: Match a
</span><a href="#local-6989586621679710759"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-type">InexactMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">)</span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-type">NoMatch</span></a></span><span>      </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">[MatchError]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710759"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-845"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchPlus"><span class="hs-identifier hs-var">matchPlus</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-type">NoMatch</span></a></span><span>      </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">[MatchError]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">)</span><span> </span><span id="local-6989586621679710758"><span class="annot"><span class="annottext">b :: Match a
</span><a href="#local-6989586621679710758"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-type">ExactMatch</span></a></span><span>   </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710758"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-846"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchPlus"><span class="hs-identifier hs-var">matchPlus</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-type">NoMatch</span></a></span><span>      </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">[MatchError]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">)</span><span> </span><span id="local-6989586621679710757"><span class="annot"><span class="annottext">b :: Match a
</span><a href="#local-6989586621679710757"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-type">InexactMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>  </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710757"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-847"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchPlus"><span class="hs-identifier hs-var">matchPlus</span></a></span><span> </span><span id="local-6989586621679710756"><span class="annot"><span class="annottext">a :: Match a
</span><a href="#local-6989586621679710756"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-type">NoMatch</span></a></span><span>      </span><span id="local-6989586621679710755"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710755"><span class="hs-identifier hs-var">d1</span></a></span></span><span> </span><span id="local-6989586621679710754"><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679710754"><span class="hs-identifier hs-var">ms</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679710753"><span class="annot"><span class="annottext">b :: Match a
</span><a href="#local-6989586621679710753"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-type">NoMatch</span></a></span><span>      </span><span id="local-6989586621679710752"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710752"><span class="hs-identifier hs-var">d2</span></a></span></span><span> </span><span id="local-6989586621679710751"><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679710751"><span class="hs-identifier hs-var">ms'</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-848"></span><span>                                             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710755"><span class="hs-identifier hs-var">d1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span>  </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710752"><span class="hs-identifier hs-var">d2</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710756"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-849"></span><span>                                             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710755"><span class="hs-identifier hs-var">d1</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span>  </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710752"><span class="hs-identifier hs-var">d2</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710753"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-850"></span><span>                                             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [MatchError] -&gt; Match a
forall a. Int -&gt; [MatchError] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-var">NoMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710755"><span class="hs-identifier hs-var">d1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679710754"><span class="hs-identifier hs-var">ms</span></a></span><span> </span><span class="annot"><span class="annottext">[MatchError] -&gt; [MatchError] -&gt; [MatchError]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679710751"><span class="hs-identifier hs-var">ms'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-851"></span><span>
</span><span id="line-852"></span><span class="hs-comment">-- | Combine two matchers. This is similar to 'ambiguousWith' with the</span><span>
</span><span id="line-853"></span><span class="hs-comment">-- difference that an exact match from the left matcher shadows any exact</span><span>
</span><span id="line-854"></span><span class="hs-comment">-- match on the right. Inexact matches are still collected however.</span><span>
</span><span id="line-855"></span><span class="hs-comment">--</span><span>
</span><span id="line-856"></span><span id="local-6989586621679712040"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchPlusShadowing"><span class="hs-identifier hs-type">matchPlusShadowing</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712040"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712040"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712040"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-857"></span><span id="matchPlusShadowing"><span class="annot"><span class="annottext">matchPlusShadowing :: forall a. Match a -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchPlusShadowing"><span class="hs-identifier hs-var hs-var">matchPlusShadowing</span></a></span></span><span> </span><span id="local-6989586621679710749"><span class="annot"><span class="annottext">a :: Match a
</span><a href="#local-6989586621679710749"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-type">ExactMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-type">ExactMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710749"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-858"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchPlusShadowing"><span class="hs-identifier hs-var">matchPlusShadowing</span></a></span><span> </span><span id="local-6989586621679710748"><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710748"><span class="hs-identifier hs-var">a</span></a></span></span><span>                   </span><span id="local-6989586621679710747"><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710747"><span class="hs-identifier hs-var">b</span></a></span></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a -&gt; Match a -&gt; Match a
forall a. Match a -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchPlus"><span class="hs-identifier hs-var">matchPlus</span></a></span><span> </span><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710748"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710747"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-859"></span><span>
</span><span id="line-860"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679710744"><span class="annot"><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-861"></span><span>  </span><span id="local-6989586621679710739"><span class="annot"><span class="annottext">fmap :: forall a b. (a -&gt; b) -&gt; Match a -&gt; Match b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var hs-var hs-var hs-var">fmap</span></a></span></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-type">NoMatch</span></a></span><span>      </span><span id="local-6989586621679710738"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710738"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679710737"><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679710737"><span class="hs-identifier hs-var">ms</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [MatchError] -&gt; Match b
forall a. Int -&gt; [MatchError] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-var">NoMatch</span></a></span><span>      </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710738"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679710737"><span class="hs-identifier hs-var">ms</span></a></span><span>
</span><span id="line-862"></span><span>  </span><span class="annot"><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span id="local-6989586621679710736"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679710736"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-type">ExactMatch</span></a></span><span>   </span><span id="local-6989586621679710735"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710735"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679710734"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710734"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [b] -&gt; Match b
forall a. Int -&gt; [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-var">ExactMatch</span></a></span><span>   </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710735"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; [a] -&gt; [b]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679710736"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710734"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-863"></span><span>  </span><span class="annot"><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span id="local-6989586621679710733"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679710733"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-type">InexactMatch</span></a></span><span> </span><span id="local-6989586621679710732"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710732"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679710731"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710731"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [b] -&gt; Match b
forall a. Int -&gt; [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-var">InexactMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710732"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; [a] -&gt; [b]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679710733"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710731"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-864"></span><span>
</span><span id="line-865"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679710721"><span id="local-6989586621679710723"><span id="local-6989586621679710725"><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-866"></span><span>  </span><span id="local-6989586621679710719"><span class="annot"><span class="annottext">pure :: forall {b}. b -&gt; Match b
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span id="local-6989586621679710718"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679710718"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [a] -&gt; Match a
forall a. Int -&gt; [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-var">ExactMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679710718"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-867"></span><span>  </span><span id="local-6989586621679710716"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b. Match (a -&gt; b) -&gt; Match a -&gt; Match b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;*&gt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match (a -&gt; b) -&gt; Match a -&gt; Match b
forall (m :: * -&gt; *) a b. Monad m =&gt; m (a -&gt; b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#ap"><span class="hs-identifier hs-var">ap</span></a></span><span>
</span><span id="line-868"></span><span>
</span><span id="line-869"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679710710"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-870"></span><span>  </span><span id="local-6989586621679710706"><span class="annot"><span class="annottext">return :: forall {b}. b -&gt; Match b
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var hs-var hs-var hs-var">return</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Match a
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span>
</span><span id="line-871"></span><span>
</span><span id="line-872"></span><span>  </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-type">NoMatch</span></a></span><span>      </span><span id="local-6989586621679710703"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710703"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679710702"><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679710702"><span class="hs-identifier hs-var">ms</span></a></span></span><span> </span><span id="local-6989586621679710701"><span class="annot"><span class="annottext">&gt;&gt;= :: forall a b. Match a -&gt; (a -&gt; Match b) -&gt; Match b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;&gt;=</span></a></span></span><span> </span><span class="annot"><span class="annottext">a -&gt; Match b
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [MatchError] -&gt; Match b
forall a. Int -&gt; [MatchError] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-var">NoMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710703"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679710702"><span class="hs-identifier hs-var">ms</span></a></span><span>
</span><span id="line-873"></span><span>  </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-type">ExactMatch</span></a></span><span>   </span><span id="local-6989586621679710700"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710700"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679710699"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710699"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span id="local-6989586621679710698"><span class="annot"><span class="annottext">a -&gt; Match b
</span><a href="#local-6989586621679710698"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Match b -&gt; Match b
forall a. Int -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#addDepth"><span class="hs-identifier hs-var">addDepth</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710700"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-874"></span><span>                          </span><span class="annot"><span class="annottext">(Match b -&gt; Match b) -&gt; Match b -&gt; Match b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Match b -&gt; Match b -&gt; Match b) -&gt; Match b -&gt; [Match b] -&gt; Match b
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">Match b -&gt; Match b -&gt; Match b
forall a. Match a -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchPlus"><span class="hs-identifier hs-var">matchPlus</span></a></span><span> </span><span class="annot"><span class="annottext">Match b
forall a. Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchZero"><span class="hs-identifier hs-var">matchZero</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; Match b) -&gt; [a] -&gt; [Match b]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Match b
</span><a href="#local-6989586621679710698"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710699"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-875"></span><span>  </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-type">InexactMatch</span></a></span><span> </span><span id="local-6989586621679710695"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710695"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679710694"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710694"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span id="local-6989586621679710693"><span class="annot"><span class="annottext">a -&gt; Match b
</span><a href="#local-6989586621679710693"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Match b -&gt; Match b
forall a. Int -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#addDepth"><span class="hs-identifier hs-var">addDepth</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710695"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">(Match b -&gt; Match b) -&gt; (Match b -&gt; Match b) -&gt; Match b -&gt; Match b
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span>  </span><span class="annot"><span class="annottext">Match b -&gt; Match b
forall a. Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#forceInexact"><span class="hs-identifier hs-var">forceInexact</span></a></span><span>
</span><span id="line-876"></span><span>                          </span><span class="annot"><span class="annottext">(Match b -&gt; Match b) -&gt; Match b -&gt; Match b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Match b -&gt; Match b -&gt; Match b) -&gt; Match b -&gt; [Match b] -&gt; Match b
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">Match b -&gt; Match b -&gt; Match b
forall a. Match a -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchPlus"><span class="hs-identifier hs-var">matchPlus</span></a></span><span> </span><span class="annot"><span class="annottext">Match b
forall a. Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchZero"><span class="hs-identifier hs-var">matchZero</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; Match b) -&gt; [a] -&gt; [Match b]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Match b
</span><a href="#local-6989586621679710693"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710694"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-877"></span><span>
</span><span id="line-878"></span><span id="local-6989586621679711966"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#addDepth"><span class="hs-identifier hs-type">addDepth</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Confidence"><span class="hs-identifier hs-type">Confidence</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679711966"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679711966"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-879"></span><span id="addDepth"><span class="annot"><span class="annottext">addDepth :: forall a. Int -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#addDepth"><span class="hs-identifier hs-var hs-var">addDepth</span></a></span></span><span> </span><span id="local-6989586621679710688"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710688"><span class="hs-identifier hs-var">d'</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-type">NoMatch</span></a></span><span>      </span><span id="local-6989586621679710687"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710687"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679710686"><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679710686"><span class="hs-identifier hs-var">msgs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [MatchError] -&gt; Match a
forall a. Int -&gt; [MatchError] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-var">NoMatch</span></a></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710688"><span class="hs-identifier hs-var">d'</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710687"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679710686"><span class="hs-identifier hs-var">msgs</span></a></span><span>
</span><span id="line-880"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#addDepth"><span class="hs-identifier hs-var">addDepth</span></a></span><span> </span><span id="local-6989586621679710684"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710684"><span class="hs-identifier hs-var">d'</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-type">ExactMatch</span></a></span><span>   </span><span id="local-6989586621679710683"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710683"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679710682"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710682"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [a] -&gt; Match a
forall a. Int -&gt; [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-var">ExactMatch</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710684"><span class="hs-identifier hs-var">d'</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710683"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710682"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-881"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#addDepth"><span class="hs-identifier hs-var">addDepth</span></a></span><span> </span><span id="local-6989586621679710681"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710681"><span class="hs-identifier hs-var">d'</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-type">InexactMatch</span></a></span><span> </span><span id="local-6989586621679710680"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710680"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679710679"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710679"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [a] -&gt; Match a
forall a. Int -&gt; [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-var">InexactMatch</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710681"><span class="hs-identifier hs-var">d'</span></a></span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710680"><span class="hs-identifier hs-var">d</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710679"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-882"></span><span>
</span><span id="line-883"></span><span id="local-6989586621679710678"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#forceInexact"><span class="hs-identifier hs-type">forceInexact</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679710678"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679710678"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-884"></span><span id="forceInexact"><span class="annot"><span class="annottext">forceInexact :: forall a. Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#forceInexact"><span class="hs-identifier hs-var hs-var">forceInexact</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-type">ExactMatch</span></a></span><span> </span><span id="local-6989586621679710677"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710677"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679710676"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710676"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [a] -&gt; Match a
forall a. Int -&gt; [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-var">InexactMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710677"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710676"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-885"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#forceInexact"><span class="hs-identifier hs-var">forceInexact</span></a></span><span> </span><span id="local-6989586621679710675"><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710675"><span class="hs-identifier hs-var">m</span></a></span></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710675"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-886"></span><span>
</span><span id="line-887"></span><span class="hs-comment">------------------------------</span><span>
</span><span id="line-888"></span><span class="hs-comment">-- Various match primitives</span><span>
</span><span id="line-889"></span><span class="hs-comment">--</span><span>
</span><span id="line-890"></span><span>
</span><span id="line-891"></span><span id="local-6989586621679712021"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchErrorExpected"><span class="hs-identifier hs-type">matchErrorExpected</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchErrorNoSuch"><span class="hs-identifier hs-type">matchErrorNoSuch</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712021"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-892"></span><span id="matchErrorExpected"><span class="annot"><span class="annottext">matchErrorExpected :: forall a. FilePath -&gt; FilePath -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchErrorExpected"><span class="hs-identifier hs-var hs-var">matchErrorExpected</span></a></span></span><span> </span><span id="local-6989586621679710674"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710674"><span class="hs-identifier hs-var">thing</span></a></span></span><span> </span><span id="local-6989586621679710673"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710673"><span class="hs-identifier hs-var">got</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [MatchError] -&gt; Match a
forall a. Int -&gt; [MatchError] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-var">NoMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; MatchError
</span><a href="Distribution.Simple.BuildTarget.html#MatchErrorExpected"><span class="hs-identifier hs-var">MatchErrorExpected</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710674"><span class="hs-identifier hs-var">thing</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710673"><span class="hs-identifier hs-var">got</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-893"></span><span id="matchErrorNoSuch"><span class="annot"><span class="annottext">matchErrorNoSuch :: forall a. FilePath -&gt; FilePath -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchErrorNoSuch"><span class="hs-identifier hs-var hs-var">matchErrorNoSuch</span></a></span></span><span>   </span><span id="local-6989586621679710672"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710672"><span class="hs-identifier hs-var">thing</span></a></span></span><span> </span><span id="local-6989586621679710671"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710671"><span class="hs-identifier hs-var">got</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [MatchError] -&gt; Match a
forall a. Int -&gt; [MatchError] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-var">NoMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; MatchError
</span><a href="Distribution.Simple.BuildTarget.html#MatchErrorNoSuch"><span class="hs-identifier hs-var">MatchErrorNoSuch</span></a></span><span>   </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710672"><span class="hs-identifier hs-var">thing</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710671"><span class="hs-identifier hs-var">got</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-894"></span><span>
</span><span id="line-895"></span><span id="local-6989586621679710670"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#expecting"><span class="hs-identifier hs-type">expecting</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679710670"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679710670"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-896"></span><span id="expecting"><span class="annot"><span class="annottext">expecting :: forall a. FilePath -&gt; FilePath -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#expecting"><span class="hs-identifier hs-var hs-var">expecting</span></a></span></span><span> </span><span id="local-6989586621679710667"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710667"><span class="hs-identifier hs-var">thing</span></a></span></span><span> </span><span id="local-6989586621679710666"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710666"><span class="hs-identifier hs-var">got</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-type">NoMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">[MatchError]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; Match a
forall a. FilePath -&gt; FilePath -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchErrorExpected"><span class="hs-identifier hs-var">matchErrorExpected</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710667"><span class="hs-identifier hs-var">thing</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710666"><span class="hs-identifier hs-var">got</span></a></span><span>
</span><span id="line-897"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#expecting"><span class="hs-identifier hs-var">expecting</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span>     </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span>   </span><span id="local-6989586621679710665"><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710665"><span class="hs-identifier hs-var">m</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710665"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-898"></span><span>
</span><span id="line-899"></span><span id="local-6989586621679712016"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#orNoSuchThing"><span class="hs-identifier hs-type">orNoSuchThing</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712016"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712016"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-900"></span><span id="orNoSuchThing"><span class="annot"><span class="annottext">orNoSuchThing :: forall a. FilePath -&gt; FilePath -&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#orNoSuchThing"><span class="hs-identifier hs-var hs-var">orNoSuchThing</span></a></span></span><span> </span><span id="local-6989586621679710662"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710662"><span class="hs-identifier hs-var">thing</span></a></span></span><span> </span><span id="local-6989586621679710661"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710661"><span class="hs-identifier hs-var">got</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-type">NoMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">[MatchError]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; Match a
forall a. FilePath -&gt; FilePath -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchErrorNoSuch"><span class="hs-identifier hs-var">matchErrorNoSuch</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710662"><span class="hs-identifier hs-var">thing</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710661"><span class="hs-identifier hs-var">got</span></a></span><span>
</span><span id="line-901"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#orNoSuchThing"><span class="hs-identifier hs-var">orNoSuchThing</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span>     </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span>   </span><span id="local-6989586621679710660"><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710660"><span class="hs-identifier hs-var">m</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710660"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-902"></span><span>
</span><span id="line-903"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#increaseConfidence"><span class="hs-identifier hs-type">increaseConfidence</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-904"></span><span id="increaseConfidence"><span class="annot"><span class="annottext">increaseConfidence :: Match ()
</span><a href="Distribution.Simple.BuildTarget.html#increaseConfidence"><span class="hs-identifier hs-var hs-var">increaseConfidence</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [()] -&gt; Match ()
forall a. Int -&gt; [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-var">ExactMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-905"></span><span>
</span><span id="line-906"></span><span id="local-6989586621679712015"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#increaseConfidenceFor"><span class="hs-identifier hs-type">increaseConfidenceFor</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712015"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712015"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-907"></span><span id="increaseConfidenceFor"><span class="annot"><span class="annottext">increaseConfidenceFor :: forall a. Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#increaseConfidenceFor"><span class="hs-identifier hs-var hs-var">increaseConfidenceFor</span></a></span></span><span> </span><span id="local-6989586621679710656"><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710656"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a
</span><a href="#local-6989586621679710656"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">Match a -&gt; (a -&gt; Match a) -&gt; Match a
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679710655"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679710655"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Match ()
</span><a href="Distribution.Simple.BuildTarget.html#increaseConfidence"><span class="hs-identifier hs-var">increaseConfidence</span></a></span><span> </span><span class="annot"><span class="annottext">Match () -&gt; Match a -&gt; Match a
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Match a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679710655"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-908"></span><span>
</span><span id="line-909"></span><span id="local-6989586621679712004"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#nubMatches"><span class="hs-identifier hs-type">nubMatches</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621679712004"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712004"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712004"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-910"></span><span id="nubMatches"><span class="annot"><span class="annottext">nubMatches :: forall a. Eq a =&gt; Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#nubMatches"><span class="hs-identifier hs-var hs-var">nubMatches</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-type">NoMatch</span></a></span><span>      </span><span id="local-6989586621679710651"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710651"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679710650"><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679710650"><span class="hs-identifier hs-var">msgs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [MatchError] -&gt; Match a
forall a. Int -&gt; [MatchError] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-var">NoMatch</span></a></span><span>      </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710651"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679710650"><span class="hs-identifier hs-var">msgs</span></a></span><span>
</span><span id="line-911"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#nubMatches"><span class="hs-identifier hs-var">nubMatches</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-type">ExactMatch</span></a></span><span>   </span><span id="local-6989586621679710649"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710649"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679710648"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710648"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [a] -&gt; Match a
forall a. Int -&gt; [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-var">ExactMatch</span></a></span><span>   </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710649"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; [a]
forall a. Eq a =&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#nub"><span class="hs-identifier hs-var">nub</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710648"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-912"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#nubMatches"><span class="hs-identifier hs-var">nubMatches</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-type">InexactMatch</span></a></span><span> </span><span id="local-6989586621679710646"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710646"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679710645"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710645"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [a] -&gt; Match a
forall a. Int -&gt; [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-var">InexactMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710646"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; [a]
forall a. Eq a =&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#nub"><span class="hs-identifier hs-var">nub</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710645"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-913"></span><span>
</span><span id="line-914"></span><span id="local-6989586621679710644"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#nubMatchErrors"><span class="hs-identifier hs-type">nubMatchErrors</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679710644"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679710644"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-915"></span><span id="nubMatchErrors"><span class="annot"><span class="annottext">nubMatchErrors :: forall a. Match a -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#nubMatchErrors"><span class="hs-identifier hs-var hs-var">nubMatchErrors</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-type">NoMatch</span></a></span><span>      </span><span id="local-6989586621679710642"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710642"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679710641"><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679710641"><span class="hs-identifier hs-var">msgs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [MatchError] -&gt; Match a
forall a. Int -&gt; [MatchError] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-var">NoMatch</span></a></span><span>      </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710642"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[MatchError] -&gt; [MatchError]
forall a. Eq a =&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#nub"><span class="hs-identifier hs-var">nub</span></a></span><span> </span><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679710641"><span class="hs-identifier hs-var">msgs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-916"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#nubMatchErrors"><span class="hs-identifier hs-var">nubMatchErrors</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-type">ExactMatch</span></a></span><span>   </span><span id="local-6989586621679710640"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710640"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679710639"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710639"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [a] -&gt; Match a
forall a. Int -&gt; [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-var">ExactMatch</span></a></span><span>   </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710640"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710639"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-917"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#nubMatchErrors"><span class="hs-identifier hs-var">nubMatchErrors</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-type">InexactMatch</span></a></span><span> </span><span id="local-6989586621679710638"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710638"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span id="local-6989586621679710637"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710637"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [a] -&gt; Match a
forall a. Int -&gt; [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-var">InexactMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679710638"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710637"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-918"></span><span>
</span><span id="line-919"></span><span class="hs-comment">-- | Lift a list of matches to an exact match.</span><span>
</span><span id="line-920"></span><span class="hs-comment">--</span><span>
</span><span id="line-921"></span><span id="local-6989586621679710636"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#exactMatches"><span class="hs-identifier hs-type">exactMatches</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#inexactMatches"><span class="hs-identifier hs-type">inexactMatches</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679710636"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679710636"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-922"></span><span>
</span><span id="line-923"></span><span id="exactMatches"><span class="annot"><span class="annottext">exactMatches :: forall a. [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#exactMatches"><span class="hs-identifier hs-var hs-var">exactMatches</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a
forall a. Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchZero"><span class="hs-identifier hs-var">matchZero</span></a></span><span>
</span><span id="line-924"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#exactMatches"><span class="hs-identifier hs-var">exactMatches</span></a></span><span> </span><span id="local-6989586621679710634"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710634"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [a] -&gt; Match a
forall a. Int -&gt; [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-var">ExactMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710634"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-925"></span><span>
</span><span id="line-926"></span><span id="inexactMatches"><span class="annot"><span class="annottext">inexactMatches :: forall a. [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#inexactMatches"><span class="hs-identifier hs-var hs-var">inexactMatches</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Match a
forall a. Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchZero"><span class="hs-identifier hs-var">matchZero</span></a></span><span>
</span><span id="line-927"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#inexactMatches"><span class="hs-identifier hs-var">inexactMatches</span></a></span><span> </span><span id="local-6989586621679710633"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710633"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; [a] -&gt; Match a
forall a. Int -&gt; [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-var">InexactMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710633"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-928"></span><span>
</span><span id="line-929"></span><span id="local-6989586621679712011"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#tryEach"><span class="hs-identifier hs-type">tryEach</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679712011"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712011"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-930"></span><span id="tryEach"><span class="annot"><span class="annottext">tryEach :: forall a. [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#tryEach"><span class="hs-identifier hs-var hs-var">tryEach</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; Match a
forall a. [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#exactMatches"><span class="hs-identifier hs-var">exactMatches</span></a></span><span>
</span><span id="line-931"></span><span>
</span><span id="line-932"></span><span>
</span><span id="line-933"></span><span class="hs-comment">------------------------------</span><span>
</span><span id="line-934"></span><span class="hs-comment">-- Top level match runner</span><span>
</span><span id="line-935"></span><span class="hs-comment">--</span><span>
</span><span id="line-936"></span><span>
</span><span id="line-937"></span><span class="hs-comment">-- | Given a matcher and a key to look up, use the matcher to find all the</span><span>
</span><span id="line-938"></span><span class="hs-comment">-- possible matches. There may be 'None', a single 'Unambiguous' match or</span><span>
</span><span id="line-939"></span><span class="hs-comment">-- you may have an 'Ambiguous' match with several possibilities.</span><span>
</span><span id="line-940"></span><span class="hs-comment">--</span><span>
</span><span id="line-941"></span><span id="local-6989586621679712072"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#findMatch"><span class="hs-identifier hs-type">findMatch</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Eq</span></span><span> </span><span class="annot"><a href="#local-6989586621679712072"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712072"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#MaybeAmbiguous"><span class="hs-identifier hs-type">MaybeAmbiguous</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712072"><span class="hs-identifier hs-type">b</span></a></span></span><span>
</span><span id="line-942"></span><span id="findMatch"><span class="annot"><span class="annottext">findMatch :: forall b. Eq b =&gt; Match b -&gt; MaybeAmbiguous b
</span><a href="Distribution.Simple.BuildTarget.html#findMatch"><span class="hs-identifier hs-var hs-var">findMatch</span></a></span></span><span> </span><span id="local-6989586621679710628"><span class="annot"><span class="annottext">Match b
</span><a href="#local-6989586621679710628"><span class="hs-identifier hs-var">match</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-943"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Match b
</span><a href="#local-6989586621679710628"><span class="hs-identifier hs-var">match</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-944"></span><span>      </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#NoMatch"><span class="hs-identifier hs-type">NoMatch</span></a></span><span>    </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679710627"><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679710627"><span class="hs-identifier hs-var">msgs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[MatchError] -&gt; MaybeAmbiguous b
forall a. [MatchError] -&gt; MaybeAmbiguous a
</span><a href="Distribution.Simple.BuildTarget.html#None"><span class="hs-identifier hs-var">None</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[MatchError] -&gt; [MatchError]
forall a. Eq a =&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#nub"><span class="hs-identifier hs-var">nub</span></a></span><span> </span><span class="annot"><span class="annottext">[MatchError]
</span><a href="#local-6989586621679710627"><span class="hs-identifier hs-var">msgs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-945"></span><span>      </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#ExactMatch"><span class="hs-identifier hs-type">ExactMatch</span></a></span><span>   </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679710626"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679710626"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[b] -&gt; MaybeAmbiguous b
forall {a}. Eq a =&gt; [a] -&gt; MaybeAmbiguous a
</span><a href="#local-6989586621679710625"><span class="hs-identifier hs-var">checkAmbiguous</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679710626"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-946"></span><span>      </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#InexactMatch"><span class="hs-identifier hs-type">InexactMatch</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679710624"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679710624"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[b] -&gt; MaybeAmbiguous b
forall {a}. Eq a =&gt; [a] -&gt; MaybeAmbiguous a
</span><a href="#local-6989586621679710625"><span class="hs-identifier hs-var">checkAmbiguous</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679710624"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-947"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-948"></span><span>    </span><span id="local-6989586621679710625"><span class="annot"><span class="annottext">checkAmbiguous :: [a] -&gt; MaybeAmbiguous a
</span><a href="#local-6989586621679710625"><span class="hs-identifier hs-var hs-var">checkAmbiguous</span></a></span></span><span> </span><span id="local-6989586621679710621"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710621"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a]
forall a. Eq a =&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#nub"><span class="hs-identifier hs-var">nub</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710621"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-949"></span><span>                          </span><span class="hs-special">[</span><span id="local-6989586621679710620"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679710620"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; MaybeAmbiguous a
forall a. a -&gt; MaybeAmbiguous a
</span><a href="Distribution.Simple.BuildTarget.html#Unambiguous"><span class="hs-identifier hs-var">Unambiguous</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679710620"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-950"></span><span>                          </span><span id="local-6989586621679710619"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710619"><span class="hs-identifier hs-var">xs'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; MaybeAmbiguous a
forall a. [a] -&gt; MaybeAmbiguous a
</span><a href="Distribution.Simple.BuildTarget.html#Ambiguous"><span class="hs-identifier hs-var">Ambiguous</span></a></span><span>   </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679710619"><span class="hs-identifier hs-var">xs'</span></a></span><span>
</span><span id="line-951"></span><span>
</span><span id="line-952"></span><span class="hs-keyword">data</span><span> </span><span id="MaybeAmbiguous"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#MaybeAmbiguous"><span class="hs-identifier hs-var">MaybeAmbiguous</span></a></span></span><span> </span><span id="local-6989586621679711948"><span class="annot"><a href="#local-6989586621679711948"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="None"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#None"><span class="hs-identifier hs-var">None</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#MatchError"><span class="hs-identifier hs-type">MatchError</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="Unambiguous"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Unambiguous"><span class="hs-identifier hs-var">Unambiguous</span></a></span></span><span> </span><span class="annot"><a href="#local-6989586621679711948"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="Ambiguous"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Ambiguous"><span class="hs-identifier hs-var">Ambiguous</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679711948"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-953"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span id="local-6989586621679710606"><span id="local-6989586621679710608"><span id="local-6989586621679710617"><span class="annot"><span class="annottext">Int -&gt; MaybeAmbiguous a -&gt; ShowS
[MaybeAmbiguous a] -&gt; ShowS
MaybeAmbiguous a -&gt; FilePath
(Int -&gt; MaybeAmbiguous a -&gt; ShowS)
-&gt; (MaybeAmbiguous a -&gt; FilePath)
-&gt; ([MaybeAmbiguous a] -&gt; ShowS)
-&gt; Show (MaybeAmbiguous a)
forall a. Show a =&gt; Int -&gt; MaybeAmbiguous a -&gt; ShowS
forall a. Show a =&gt; [MaybeAmbiguous a] -&gt; ShowS
forall a. Show a =&gt; MaybeAmbiguous a -&gt; FilePath
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; FilePath) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [MaybeAmbiguous a] -&gt; ShowS
$cshowList :: forall a. Show a =&gt; [MaybeAmbiguous a] -&gt; ShowS
show :: MaybeAmbiguous a -&gt; FilePath
$cshow :: forall a. Show a =&gt; MaybeAmbiguous a -&gt; FilePath
showsPrec :: Int -&gt; MaybeAmbiguous a -&gt; ShowS
$cshowsPrec :: forall a. Show a =&gt; Int -&gt; MaybeAmbiguous a -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span>
</span><span id="line-954"></span><span>
</span><span id="line-955"></span><span>
</span><span id="line-956"></span><span class="hs-comment">------------------------------</span><span>
</span><span id="line-957"></span><span class="hs-comment">-- Basic matchers</span><span>
</span><span id="line-958"></span><span class="hs-comment">--</span><span>
</span><span id="line-959"></span><span>
</span><span id="line-960"></span><span class="hs-comment">{-
-- | A primitive matcher that looks up a value in a finite 'Map'. The
-- value must match exactly.
--
matchExactly :: forall a b. Ord a =&gt; [(a, b)] -&gt; (a -&gt; Match b)
matchExactly xs =
    \x -&gt; case Map.lookup x m of
            Nothing -&gt; matchZero
            Just ys -&gt; ExactMatch 0 ys
  where
    m :: Ord a =&gt; Map a [b]
    m = Map.fromListWith (++) [ (k,[x]) | (k,x) &lt;- xs ]
-}</span><span>
</span><span id="line-973"></span><span>
</span><span id="line-974"></span><span class="hs-comment">-- | A primitive matcher that looks up a value in a finite 'Map'. It checks</span><span>
</span><span id="line-975"></span><span class="hs-comment">-- for an exact or inexact match. We get an inexact match if the match</span><span>
</span><span id="line-976"></span><span class="hs-comment">-- is not exact, but the canonical forms match. It takes a canonicalisation</span><span>
</span><span id="line-977"></span><span class="hs-comment">-- function for this purpose.</span><span>
</span><span id="line-978"></span><span class="hs-comment">--</span><span>
</span><span id="line-979"></span><span class="hs-comment">-- So for example if we used string case fold as the canonicalisation</span><span>
</span><span id="line-980"></span><span class="hs-comment">-- function, then we would get case insensitive matching (but it will still</span><span>
</span><span id="line-981"></span><span class="hs-comment">-- report an exact match when the case matches too).</span><span>
</span><span id="line-982"></span><span class="hs-comment">--</span><span>
</span><span id="line-983"></span><span id="local-6989586621679712012"><span id="local-6989586621679712013"><span id="local-6989586621679712014"><span class="annot"><a href="Distribution.Simple.BuildTarget.html#matchInexactly"><span class="hs-identifier hs-type">matchInexactly</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="#local-6989586621679712014"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="#local-6989586621679712013"><span class="hs-identifier hs-type">a'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span>
</span><span id="line-984"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679712014"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679712013"><span class="hs-identifier hs-type">a'</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-985"></span><span>                        </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679712014"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621679712012"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679712014"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#Match"><span class="hs-identifier hs-type">Match</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679712012"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span></span></span></span><span>
</span><span id="line-986"></span><span id="matchInexactly"><span class="annot"><span class="annottext">matchInexactly :: forall a a' b.
(Ord a, Ord a') =&gt;
(a -&gt; a') -&gt; [(a, b)] -&gt; a -&gt; Match b
</span><a href="Distribution.Simple.BuildTarget.html#matchInexactly"><span class="hs-identifier hs-var hs-var">matchInexactly</span></a></span></span><span> </span><span id="local-6989586621679710601"><span class="annot"><span class="annottext">a -&gt; a'
</span><a href="#local-6989586621679710601"><span class="hs-identifier hs-var">cannonicalise</span></a></span></span><span> </span><span id="local-6989586621679710600"><span class="annot"><span class="annottext">[(a, b)]
</span><a href="#local-6989586621679710600"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-987"></span><span>    </span><span class="hs-glyph">\</span><span id="local-6989586621679710599"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679710599"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">a -&gt; Map a [b] -&gt; Maybe [b]
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">Map.lookup</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679710599"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Map a [b]
</span><a href="#local-6989586621679710597"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-988"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679710596"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679710596"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[b] -&gt; Match b
forall a. [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#exactMatches"><span class="hs-identifier hs-var">exactMatches</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679710596"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-989"></span><span>            </span><span class="annot"><span class="annottext">Maybe [b]
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">a' -&gt; Map a' [b] -&gt; Maybe [b]
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">Map.lookup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a'
</span><a href="#local-6989586621679710601"><span class="hs-identifier hs-var">cannonicalise</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679710599"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Map a' [b]
</span><a href="#local-6989586621679710595"><span class="hs-identifier hs-var">m'</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-990"></span><span>                         </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679710594"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679710594"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[b] -&gt; Match b
forall a. [a] -&gt; Match a
</span><a href="Distribution.Simple.BuildTarget.html#inexactMatches"><span class="hs-identifier hs-var">inexactMatches</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621679710594"><span class="hs-identifier hs-var">ys</span></a></span><span>
</span><span id="line-991"></span><span>                         </span><span class="annot"><span class="annottext">Maybe [b]
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Match b
forall a. Match a
</span><a href="Distribution.Simple.BuildTarget.html#matchZero"><span class="hs-identifier hs-var">matchZero</span></a></span><span>
</span><span id="line-992"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-993"></span><span>    </span><span id="local-6989586621679710597"><span class="annot"><span class="annottext">m :: Map a [b]
</span><a href="#local-6989586621679710597"><span class="hs-identifier hs-var hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([b] -&gt; [b] -&gt; [b]) -&gt; [(a, [b])] -&gt; Map a [b]
forall k a. Ord k =&gt; (a -&gt; a -&gt; a) -&gt; [(k, a)] -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#fromListWith"><span class="hs-identifier hs-var">Map.fromListWith</span></a></span><span> </span><span class="annot"><span class="annottext">[b] -&gt; [b] -&gt; [b]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">(++)</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679710591"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">,</span><span class="hs-special">[</span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679710590"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679710591"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679710591"><span class="hs-identifier hs-var">k</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679710590"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679710590"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(a, b)]
</span><a href="#local-6989586621679710600"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-994"></span><span>
</span><span id="line-995"></span><span>    </span><span class="hs-comment">-- the map of canonicalised keys to groups of inexact matches</span><span>
</span><span id="line-996"></span><span>    </span><span id="local-6989586621679710595"><span class="annot"><span class="annottext">m' :: Map a' [b]
</span><a href="#local-6989586621679710595"><span class="hs-identifier hs-var hs-var">m'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([b] -&gt; [b] -&gt; [b]) -&gt; (a -&gt; a') -&gt; Map a [b] -&gt; Map a' [b]
forall k2 a k1.
Ord k2 =&gt;
(a -&gt; a -&gt; a) -&gt; (k1 -&gt; k2) -&gt; Map k1 a -&gt; Map k2 a
</span><a href="../../containers/src/Data.Map.Internal.html#mapKeysWith"><span class="hs-identifier hs-var">Map.mapKeysWith</span></a></span><span> </span><span class="annot"><span class="annottext">[b] -&gt; [b] -&gt; [b]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">(++)</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a'
</span><a href="#local-6989586621679710601"><span class="hs-identifier hs-var">cannonicalise</span></a></span><span> </span><span class="annot"><span class="annottext">Map a [b]
</span><a href="#local-6989586621679710597"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-997"></span><span>
</span><span id="line-998"></span><span>
</span><span id="line-999"></span><span>
</span><span id="line-1000"></span><span class="hs-comment">------------------------------</span><span>
</span><span id="line-1001"></span><span class="hs-comment">-- Utils</span><span>
</span><span id="line-1002"></span><span class="hs-comment">--</span><span>
</span><span id="line-1003"></span><span>
</span><span id="line-1004"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#caseFold"><span class="hs-identifier hs-type">caseFold</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-1005"></span><span id="caseFold"><span class="annot"><span class="annottext">caseFold :: ShowS
</span><a href="Distribution.Simple.BuildTarget.html#caseFold"><span class="hs-identifier hs-var hs-var">caseFold</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="Distribution.Utils.Generic.html#lowercase"><span class="hs-identifier hs-var">lowercase</span></a></span><span>
</span><span id="line-1006"></span><span>
</span><span id="line-1007"></span><span>
</span><span id="line-1008"></span><span class="hs-comment">-- | Check that the given build targets are valid in the current context.</span><span>
</span><span id="line-1009"></span><span class="hs-comment">--</span><span>
</span><span id="line-1010"></span><span class="hs-comment">-- Also swizzle into a more convenient form.</span><span>
</span><span id="line-1011"></span><span class="hs-comment">--</span><span>
</span><span id="line-1012"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#checkBuildTargets"><span class="hs-identifier hs-type">checkBuildTargets</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageDescription.html#PackageDescription"><span class="hs-identifier hs-type">PackageDescription</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.LocalBuildInfo.html#LocalBuildInfo"><span class="hs-identifier hs-type">LocalBuildInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTarget"><span class="hs-identifier hs-type">BuildTarget</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1013"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.TargetInfo.html#TargetInfo"><span class="hs-identifier hs-type">TargetInfo</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-1014"></span><span id="checkBuildTargets"><span class="annot"><span class="annottext">checkBuildTargets :: Verbosity
-&gt; PackageDescription
-&gt; LocalBuildInfo
-&gt; [BuildTarget]
-&gt; IO [TargetInfo]
</span><a href="Distribution.Simple.BuildTarget.html#checkBuildTargets"><span class="hs-identifier hs-var hs-var">checkBuildTargets</span></a></span></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679710586"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679710586"><span class="hs-identifier hs-var">pkg_descr</span></a></span></span><span> </span><span id="local-6989586621679710585"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679710585"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>      </span><span class="hs-glyph">=</span><span>
</span><span id="line-1015"></span><span>    </span><span class="annot"><span class="annottext">[TargetInfo] -&gt; IO [TargetInfo]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageDescription -&gt; LocalBuildInfo -&gt; [TargetInfo]
</span><a href="Distribution.Types.LocalBuildInfo.html#allTargetsInBuildOrder%27"><span class="hs-identifier hs-var">allTargetsInBuildOrder'</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679710586"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679710585"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1016"></span><span>
</span><span id="line-1017"></span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#checkBuildTargets"><span class="hs-identifier hs-var">checkBuildTargets</span></a></span><span> </span><span id="local-6989586621679710583"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679710583"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679710582"><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679710582"><span class="hs-identifier hs-var">pkg_descr</span></a></span></span><span> </span><span id="local-6989586621679710581"><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679710581"><span class="hs-identifier hs-var">lbi</span></a></span></span><span> </span><span id="local-6989586621679710580"><span class="annot"><span class="annottext">[BuildTarget]
</span><a href="#local-6989586621679710580"><span class="hs-identifier hs-var">targets</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1018"></span><span>
</span><span id="line-1019"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679710579"><span class="annot"><span class="annottext">[(ComponentName, Maybe (Either ModuleName FilePath))]
</span><a href="#local-6989586621679710579"><span class="hs-identifier hs-var">enabled</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679710578"><span class="annot"><span class="annottext">[(ComponentName, ComponentDisabledReason)]
</span><a href="#local-6989586621679710578"><span class="hs-identifier hs-var">disabled</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1020"></span><span>          </span><span class="annot"><span class="annottext">[Either
   (ComponentName, Maybe (Either ModuleName FilePath))
   (ComponentName, ComponentDisabledReason)]
-&gt; ([(ComponentName, Maybe (Either ModuleName FilePath))],
    [(ComponentName, ComponentDisabledReason)])
forall a b. [Either a b] -&gt; ([a], [b])
</span><a href="../../base/src/Data.Either.html#partitionEithers"><span class="hs-identifier hs-var">partitionEithers</span></a></span><span>
</span><span id="line-1021"></span><span>            </span><span class="hs-special">[</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ComponentRequestedSpec
-&gt; Component -&gt; Maybe ComponentDisabledReason
</span><a href="Distribution.Types.ComponentRequestedSpec.html#componentDisabledReason"><span class="hs-identifier hs-var">componentDisabledReason</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LocalBuildInfo -&gt; ComponentRequestedSpec
</span><a href="Distribution.Types.LocalBuildInfo.html#componentEnabledSpec"><span class="hs-identifier hs-var hs-var">componentEnabledSpec</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679710581"><span class="hs-identifier hs-var">lbi</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679710575"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1022"></span><span>                </span><span class="annot"><span class="annottext">Maybe ComponentDisabledReason
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(ComponentName, Maybe (Either ModuleName FilePath))
-&gt; Either
     (ComponentName, Maybe (Either ModuleName FilePath))
     (ComponentName, ComponentDisabledReason)
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span>  </span><span class="annot"><span class="annottext">(ComponentName, Maybe (Either ModuleName FilePath))
</span><a href="#local-6989586621679710574"><span class="hs-identifier hs-var">target'</span></a></span><span>
</span><span id="line-1023"></span><span>                </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679710573"><span class="annot"><span class="annottext">ComponentDisabledReason
</span><a href="#local-6989586621679710573"><span class="hs-identifier hs-var">reason</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(ComponentName, ComponentDisabledReason)
-&gt; Either
     (ComponentName, Maybe (Either ModuleName FilePath))
     (ComponentName, ComponentDisabledReason)
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679710572"><span class="hs-identifier hs-var">cname</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ComponentDisabledReason
</span><a href="#local-6989586621679710573"><span class="hs-identifier hs-var">reason</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1024"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679710571"><span class="annot"><span class="annottext">BuildTarget
</span><a href="#local-6989586621679710571"><span class="hs-identifier hs-var">target</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[BuildTarget]
</span><a href="#local-6989586621679710580"><span class="hs-identifier hs-var">targets</span></a></span><span>
</span><span id="line-1025"></span><span>            </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679710574"><span class="annot"><span class="annottext">target' :: (ComponentName, Maybe (Either ModuleName FilePath))
</span><a href="#local-6989586621679710574"><span class="hs-identifier hs-var">target'</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621679710572"><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679710572"><span class="hs-identifier hs-var">cname</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Maybe (Either ModuleName FilePath)
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildTarget -&gt; (ComponentName, Maybe (Either ModuleName FilePath))
</span><a href="#local-6989586621679710570"><span class="hs-identifier hs-var">swizzleTarget</span></a></span><span> </span><span class="annot"><span class="annottext">BuildTarget
</span><a href="#local-6989586621679710571"><span class="hs-identifier hs-var">target</span></a></span><span>
</span><span id="line-1026"></span><span>            </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679710575"><span class="annot"><span class="annottext">comp :: Component
</span><a href="#local-6989586621679710575"><span class="hs-identifier hs-var hs-var">comp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDescription -&gt; ComponentName -&gt; Component
</span><a href="Distribution.Types.PackageDescription.html#getComponent"><span class="hs-identifier hs-var">getComponent</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679710582"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679710572"><span class="hs-identifier hs-var">cname</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-1027"></span><span>
</span><span id="line-1028"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[(ComponentName, ComponentDisabledReason)]
</span><a href="#local-6989586621679710578"><span class="hs-identifier hs-var">disabled</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1029"></span><span>      </span><span class="hs-special">[</span><span class="hs-special">]</span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-1030"></span><span>      </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621679710568"><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679710568"><span class="hs-identifier hs-var">cname</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679710567"><span class="annot"><span class="annottext">ComponentDisabledReason
</span><a href="#local-6989586621679710567"><span class="hs-identifier hs-var">reason</span></a></span></span><span class="hs-special">)</span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[(ComponentName, ComponentDisabledReason)]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Verbosity -&gt; FilePath -&gt; IO ()
forall a. Verbosity -&gt; FilePath -&gt; IO a
</span><a href="Distribution.Simple.Utils.html#die%27"><span class="hs-identifier hs-var">die'</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679710583"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; IO ()) -&gt; FilePath -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ComponentDisabledReason -&gt; FilePath
</span><a href="#local-6989586621679710566"><span class="hs-identifier hs-var">formatReason</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName -&gt; FilePath
</span><a href="Distribution.Types.ComponentName.html#showComponentName"><span class="hs-identifier hs-var">showComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679710568"><span class="hs-identifier hs-var">cname</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ComponentDisabledReason
</span><a href="#local-6989586621679710567"><span class="hs-identifier hs-var">reason</span></a></span><span>
</span><span id="line-1031"></span><span>
</span><span id="line-1032"></span><span>    </span><span class="annot"><span class="annottext">[(ComponentName, Either ModuleName FilePath)]
-&gt; ((ComponentName, Either ModuleName FilePath) -&gt; IO ()) -&gt; IO ()
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Foldable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f ()
</span><a href="../../base/src/Data.Foldable.html#for_"><span class="hs-identifier hs-var">for_</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679710563"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Either ModuleName FilePath
</span><a href="#local-6989586621679710562"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679710563"><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679710563"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679710562"><span class="annot"><span class="annottext">Either ModuleName FilePath
</span><a href="#local-6989586621679710562"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(ComponentName, Maybe (Either ModuleName FilePath))]
</span><a href="#local-6989586621679710579"><span class="hs-identifier hs-var">enabled</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">(((ComponentName, Either ModuleName FilePath) -&gt; IO ()) -&gt; IO ())
-&gt; ((ComponentName, Either ModuleName FilePath) -&gt; IO ()) -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679710561"><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679710561"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679710560"><span class="annot"><span class="annottext">Either ModuleName FilePath
</span><a href="#local-6989586621679710560"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-1033"></span><span>      </span><span class="annot"><span class="annottext">Verbosity -&gt; FilePath -&gt; IO ()
</span><a href="Distribution.Simple.Utils.html#warn"><span class="hs-identifier hs-var">warn</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679710583"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; IO ()) -&gt; FilePath -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Ignoring '&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">(ModuleName -&gt; FilePath)
-&gt; ShowS -&gt; Either ModuleName FilePath -&gt; FilePath
forall a c b. (a -&gt; c) -&gt; (b -&gt; c) -&gt; Either a b -&gt; c
</span><a href="../../base/src/Data.Either.html#either"><span class="hs-identifier hs-var">either</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; FilePath
forall a. Pretty a =&gt; a -&gt; FilePath
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">Either ModuleName FilePath
</span><a href="#local-6989586621679710560"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;. The whole &quot;</span></span><span>
</span><span id="line-1034"></span><span>                    </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentName -&gt; FilePath
</span><a href="Distribution.Types.ComponentName.html#showComponentName"><span class="hs-identifier hs-var">showComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679710561"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; will be processed. (Support for &quot;</span></span><span>
</span><span id="line-1035"></span><span>                    </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;module and file targets has not been implemented yet.)&quot;</span></span><span>
</span><span id="line-1036"></span><span>
</span><span id="line-1037"></span><span>    </span><span class="hs-comment">-- Pick out the actual CLBIs for each of these cnames</span><span>
</span><span id="line-1038"></span><span>    </span><span id="local-6989586621679710556"><span class="annot"><span class="annottext">[TargetInfo]
</span><a href="#local-6989586621679710556"><span class="hs-identifier hs-var">enabled'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(ComponentName, Maybe (Either ModuleName FilePath))]
-&gt; ((ComponentName, Maybe (Either ModuleName FilePath))
    -&gt; IO TargetInfo)
-&gt; IO [TargetInfo]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
t a -&gt; (a -&gt; f b) -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#for"><span class="hs-identifier hs-var">for</span></a></span><span> </span><span class="annot"><span class="annottext">[(ComponentName, Maybe (Either ModuleName FilePath))]
</span><a href="#local-6989586621679710579"><span class="hs-identifier hs-var">enabled</span></a></span><span> </span><span class="annot"><span class="annottext">(((ComponentName, Maybe (Either ModuleName FilePath))
  -&gt; IO TargetInfo)
 -&gt; IO [TargetInfo])
-&gt; ((ComponentName, Maybe (Either ModuleName FilePath))
    -&gt; IO TargetInfo)
-&gt; IO [TargetInfo]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621679710554"><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679710554"><span class="hs-identifier hs-var">cname</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (Either ModuleName FilePath)
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-1039"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">PackageDescription
-&gt; LocalBuildInfo -&gt; ComponentName -&gt; [TargetInfo]
</span><a href="Distribution.Types.LocalBuildInfo.html#componentNameTargets%27"><span class="hs-identifier hs-var">componentNameTargets'</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDescription
</span><a href="#local-6989586621679710582"><span class="hs-identifier hs-var">pkg_descr</span></a></span><span> </span><span class="annot"><span class="annottext">LocalBuildInfo
</span><a href="#local-6989586621679710581"><span class="hs-identifier hs-var">lbi</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679710554"><span class="hs-identifier hs-var">cname</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1040"></span><span>            </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; IO TargetInfo
forall a. HasCallStack =&gt; FilePath -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;checkBuildTargets: nothing enabled&quot;</span></span><span>
</span><span id="line-1041"></span><span>            </span><span class="hs-special">[</span><span id="local-6989586621679710552"><span class="annot"><span class="annottext">TargetInfo
</span><a href="#local-6989586621679710552"><span class="hs-identifier hs-var">target</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TargetInfo -&gt; IO TargetInfo
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">TargetInfo
</span><a href="#local-6989586621679710552"><span class="hs-identifier hs-var">target</span></a></span><span>
</span><span id="line-1042"></span><span>            </span><span id="local-6989586621679710551"><span class="annot"><span class="annottext">[TargetInfo]
</span><a href="#local-6989586621679710551"><span class="hs-identifier hs-var">_targets</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; IO TargetInfo
forall a. HasCallStack =&gt; FilePath -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;checkBuildTargets: multiple copies enabled&quot;</span></span><span>
</span><span id="line-1043"></span><span>
</span><span id="line-1044"></span><span>    </span><span class="annot"><span class="annottext">[TargetInfo] -&gt; IO [TargetInfo]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">[TargetInfo]
</span><a href="#local-6989586621679710556"><span class="hs-identifier hs-var">enabled'</span></a></span><span>
</span><span id="line-1045"></span><span>
</span><span id="line-1046"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-1047"></span><span>    </span><span id="local-6989586621679710570"><span class="annot"><span class="annottext">swizzleTarget :: BuildTarget -&gt; (ComponentName, Maybe (Either ModuleName FilePath))
</span><a href="#local-6989586621679710570"><span class="hs-identifier hs-var hs-var">swizzleTarget</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetComponent"><span class="hs-identifier hs-type">BuildTargetComponent</span></a></span><span> </span><span id="local-6989586621679710550"><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679710550"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679710550"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (Either ModuleName FilePath)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1048"></span><span>    </span><span class="annot"><a href="#local-6989586621679710570"><span class="hs-identifier hs-var">swizzleTarget</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetModule"><span class="hs-identifier hs-type">BuildTargetModule</span></a></span><span>    </span><span id="local-6989586621679710549"><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679710549"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679710548"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679710548"><span class="hs-identifier hs-var">m</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679710549"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Either ModuleName FilePath -&gt; Maybe (Either ModuleName FilePath)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; Either ModuleName FilePath
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span>  </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679710548"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1049"></span><span>    </span><span class="annot"><a href="#local-6989586621679710570"><span class="hs-identifier hs-var">swizzleTarget</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.BuildTarget.html#BuildTargetFile"><span class="hs-identifier hs-type">BuildTargetFile</span></a></span><span>      </span><span id="local-6989586621679710547"><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679710547"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span id="local-6989586621679710546"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710546"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679710547"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Either ModuleName FilePath -&gt; Maybe (Either ModuleName FilePath)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; Either ModuleName FilePath
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710546"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1050"></span><span>
</span><span id="line-1051"></span><span>    </span><span id="local-6989586621679710566"><span class="annot"><span class="annottext">formatReason :: FilePath -&gt; ComponentDisabledReason -&gt; FilePath
</span><a href="#local-6989586621679710566"><span class="hs-identifier hs-var hs-var">formatReason</span></a></span></span><span> </span><span id="local-6989586621679710545"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710545"><span class="hs-identifier hs-var">cn</span></a></span></span><span> </span><span class="annot"><span class="annottext">ComponentDisabledReason
</span><a href="Distribution.Types.ComponentRequestedSpec.html#DisabledComponent"><span class="hs-identifier hs-var">DisabledComponent</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1052"></span><span>        </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Cannot process the &quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710545"><span class="hs-identifier hs-var">cn</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; because the component is marked &quot;</span></span><span>
</span><span id="line-1053"></span><span>     </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;as disabled in the .cabal file.&quot;</span></span><span>
</span><span id="line-1054"></span><span>    </span><span class="annot"><a href="#local-6989586621679710566"><span class="hs-identifier hs-var">formatReason</span></a></span><span> </span><span id="local-6989586621679710543"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710543"><span class="hs-identifier hs-var">cn</span></a></span></span><span> </span><span class="annot"><span class="annottext">ComponentDisabledReason
</span><a href="Distribution.Types.ComponentRequestedSpec.html#DisabledAllTests"><span class="hs-identifier hs-var">DisabledAllTests</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1055"></span><span>        </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Cannot process the &quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710543"><span class="hs-identifier hs-var">cn</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; because test suites are not &quot;</span></span><span>
</span><span id="line-1056"></span><span>     </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;enabled. Run configure with the flag --enable-tests&quot;</span></span><span>
</span><span id="line-1057"></span><span>    </span><span class="annot"><a href="#local-6989586621679710566"><span class="hs-identifier hs-var">formatReason</span></a></span><span> </span><span id="local-6989586621679710541"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710541"><span class="hs-identifier hs-var">cn</span></a></span></span><span> </span><span class="annot"><span class="annottext">ComponentDisabledReason
</span><a href="Distribution.Types.ComponentRequestedSpec.html#DisabledAllBenchmarks"><span class="hs-identifier hs-var">DisabledAllBenchmarks</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1058"></span><span>        </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Cannot process the &quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710541"><span class="hs-identifier hs-var">cn</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; because benchmarks are not &quot;</span></span><span>
</span><span id="line-1059"></span><span>     </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;enabled. Re-run configure with the flag --enable-benchmarks&quot;</span></span><span>
</span><span id="line-1060"></span><span>    </span><span class="annot"><a href="#local-6989586621679710566"><span class="hs-identifier hs-var">formatReason</span></a></span><span> </span><span id="local-6989586621679710539"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710539"><span class="hs-identifier hs-var">cn</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ComponentRequestedSpec.html#DisabledAllButOne"><span class="hs-identifier hs-type">DisabledAllButOne</span></a></span><span> </span><span id="local-6989586621679710537"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710537"><span class="hs-identifier hs-var">cn'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-1061"></span><span>        </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Cannot process the &quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710539"><span class="hs-identifier hs-var">cn</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; because this package was &quot;</span></span><span>
</span><span id="line-1062"></span><span>     </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;configured only to build &quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710537"><span class="hs-identifier hs-var">cn'</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;. Re-run configure &quot;</span></span><span>
</span><span id="line-1063"></span><span>     </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;with the argument &quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621679710539"><span class="hs-identifier hs-var">cn</span></a></span><span>
</span><span id="line-1064"></span></pre></body></html>